jf3096/json-typescript-mapper

no such file or directory utils.js.map

Muji86 opened this issue · 7 comments

I'm trying to use this with Ionic 2 and it sounds all too simple to implement however when I try to run my app I get the below error:
Any ideas?

Error: Module build failed: Error: ENOENT: no such file or directory, open 'D:\my-app\node_modules\json-typescript-mapper\libs\utils.js.map'
at Error (native)
at Object. (http://localhost:8100/build/main.js:107175:7)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:93208:15)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:107418:32)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:7567:22)
at webpack_require (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:6389:21)
at webpack_require (http://localhost:8100/build/main.js:20:30)

Having same issue with Ionic 2 app

@sumeshpunakkal I managed to fix it by generating a .map file using uglify js

Has anyone found the solution for this issue yet?

I am still seeing this issue with ionic app, anyone solve this?

C:\xxx\node_modules\json-typescript-mapper>uglifyjs lib/utils.js -o utils.js --source-map utils.map.js
will generate utils.js and utils.map.js in json-typescript-mapper folder... copy these files into lib folder @clarkmcnally

Getting the same issue with Angular 4.

ERROR in ./node_modules/json-typescript-mapper/libs/utils.ts
Module build failed: Error: C:\Development\web\node_modules\json-typescript-mapper\libs\utils.ts is not part of the compilation output. Please check the other error messages for details.
at AngularCompilerPlugin.getCompiledFile (C:\Development\web\cccweb\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:629:23)
at plugin.done.then (C:\Development\web\cccweb\node_modules@ngtools\webpack\src\loader.js:467:39)
at process._tickCallback (internal/process/next_tick.js:109:7)
@ ./node_modules/json-typescript-mapper/index.js 3:14-37
@ ./src/app/powermanagement/pm-data-service/pm-data.service.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

what @wallacemv said worked for Ionic 2, with a slight correction to the command:
uglifyjs libs/utils.js -o utils.js --source-map