jf3096 / json-typescript-mapper

a solution for adapter layer which make use of typescript reflection mapping from pure server-returned json to target typescript model
MIT License
144 stars 55 forks source link

no such file or directory utils.js.map #11

Open Muji86 opened 7 years ago

Muji86 commented 7 years ago

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)

sumeshpunakkal commented 7 years ago

Having same issue with Ionic 2 app

Muji86 commented 7 years ago

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

Punleu commented 7 years ago

Has anyone found the solution for this issue yet?

clarkmcnally commented 7 years ago

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

wallacemv commented 6 years ago

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

eltimmo commented 6 years ago

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

GeorgeL9 commented 6 years ago

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