I am using Node.js 18 and typescript
I builded my source of project and i got an error:
C:UsersuserDesktopWorkblahblahbuildcommandsinformationhelp.js.map:1
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../../src/commands/information/help.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAMoB;AACpB,2CAAwF;AACxF,2DAA8D;AAG9D,uCAAyB;AACzB,+BAAmC;AAqBnC,iBAAS;IA
CP,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,2BAA2B;IACxC,IAAI,EAAE,IAAI,gCAAmB,EAAE;SAC1B,OAAO,CAAC,MAAM,CAAC;SACf,cAAc,CAAC,WAAI,CAAC,EAAE,CAAC,2BAA2B,CAAC,CAAC;SACpD,2BAA2B,CAAC,IAAA,0BAAmB,EAAC,2BAA2B,CAAC,CAAC;SAC7E,eAAe,CAAC,MAAM,CAA
C,EAAE,CACtB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;SACpB,cAAc,CAAC,WAAI,CAAC,EAAE,CAAC,wCAAwC,CAAC,CAAC;SACjE,2BAA2B,CAAC,IAAA,0BAAmB,EAAC,wCAAwC,CAAC,CAAC,CAElG;IACL,OAAO,EAAE,KAAK,WAAU,GAAQ,EAAE,WAA+B;QAC/D,IAAI,YAAY,GAAG,EAAE,CAAA;QA
CrB,IAAI,oBAAoB,GAAG,EAAE,CAAA;QAE7B,IAAI,KAAK,GAAG,IAAI,CAAA;QAChB,KAAK,IAAI,WAAW,IAAI,EAAE,CAAC,WAAW,CAAC,IAAA,cAAO,EAAC,IAAA,WAAI,EAAC,SAAS,GAAC,kBAAkB,CAAC,CAAC,CAAC,EAAC;YAClF,IAAI,QAAQ,GAAG,OAAO,CAAC,kBAAkB,GAAE,WAAW,CAAC,
CAAA;YACvD,YAAY,CAAC,IAAI,CAAC,IAAI,0CAA6B,EAAE;iBAChD,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC;iBACjC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;iBACxB,QAAQ,CAAC,IAAA,gCAAyB,EAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;iBAClE,cAAc,CAAC,IAAA,gCAAyB,EAAC,QAA
Q,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;iBACnF,UAAU,CAAC,KAAK,CAAC,CACrB,CAAA;YACD,KAAK,GAAG,KAAK,CAAA;YACb,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;SACpC;QAED,MAAM,qBAAqB,GAAG,IAAI,oCAAuB,EAAE;aACtD,WAAW,CAAC,mBAAmB,CAAC;aAChC,UAAU,CAAC,
GAAG,YAAY,CAAC,CAAA;QAEhC,MAAM,GAAG,GAA0C,IAAI,6BAAgB,EAAE,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAA;QAE9G,MAAM,WAAW,CAAC,KAAK,CAAC;YACtB,MAAM,EAAE,CAAC,MAAM,IAAA,mCAAoB,EAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;YACzF,UAAU,EAAE,CAAC,GAAU,CAAC;SACzB,CAAC,CAAC;IACL,CAAC;CACS,CAAA"}
^
SyntaxError: Unexpected token ':'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1176:20)
at Module._compile (node:internal/modules/cjs/loader:1218:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at C:UsersholybaechuDesktopWorkverico-discord-botbuildeventsregisterCommands.js:49:170
at async Object.execute (C:UsersholybaechuDesktopWorkverico-discord-botbuildeventsregisterCommands.js:49:34)
Node.js v18.16.0
here is my tsconfig:
{
"compilerOptions": {
"target": "es2017",
"module": "commonjs",
"lib": ["dom", "es6", "es2017", "esnext.asynciterable"],
"skipLibCheck": true,
"sourceMap": true,
"outDir": "./build",
"moduleResolution": "node",
"removeComments": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"baseUrl": ".",
"esModuleInterop": true,
"declaration": true,
"declarationDir": "src/types"
},
"exclude": ["node_modules", "./src/types"],
"include": ["./src", "./src/**/*.json"]
}
I will provide more information if you ask me
I tried:
Searching on google(didnt help)
Ask ChatGPT(didnt help also)
2
Answers
I solved the problem by disabling sourcemaps in tsconfig.
Sorry for wasting you time
add
{
after"mappings":
.The code will be this :