You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to transpile my code typescript using grunt-ts with tsconfig.file. When I run the command npm run grunt the follow error was shown:
➜ backend git:(master) ✗ npm run grunt
>[email protected] grunt /home/leydev/MEGAsync/Projects/blog/backend
> grunt
Running "ts:default" (ts) task
Compiling...
Using tsc v3.9.7
src/routers/schemas/index.ts(1,22): error TS2732: Cannot find module './postUser.schema.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
src/routers/schemas/index.ts(2,27): error TS2732: Cannot find module './patchUserById.schema.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
src/routers/schemas/index.ts(3,22): error TS2732: Cannot find module './posts/postPost.schema.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
src/routers/schemas/index.ts(4,27): error TS2732: Cannot find module './posts/patchPostById.schema.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
src/routers/schemas/index.ts(5,25): error TS2732: Cannot find module './auth/postAuthAPI.schema.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
>> 5 non-emit-preventing type warnings
>> Error: tsc return code: 2
Warning: Task "ts:default" failed. Use --force to continue.
Aborted due to warnings.
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR![email protected] grunt: `grunt`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the [email protected] grunt script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/leydev/.npm/_logs/2020-08-30T05_44_28_407Z-debug.log
In tsconfig.json already has the option resolveJsonModule, but was ignored.
in the readme there is a way to pass tsconfig as an object. What you want to do is pass it that way in your Gruntfile and use passthrough true. The docs have the exact syntax
I'm trying to transpile my code typescript using grunt-ts with tsconfig.file. When I run the command
npm run grunt
the follow error was shown:In tsconfig.json already has the option
resolveJsonModule
, but was ignored.This is the gruntfile.js:
The text was updated successfully, but these errors were encountered: