Got error output when using with Webpack
See original GitHub issueWhen using Webpack to package the Ng2 projects with TypeScript, got such error outputs in console.
ERROR in ./~/typedjson/js/tests/polymorphism-abstract-class.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../typed-json in E:\Developments\Projects\fenxiao\node_modules\typedjson\js\tests
@ ./~/typedjson/js/tests/polymorphism-abstract-class.js 20:8-84
ERROR in ./~/typedjson/js/tests/polymorphism-custom-names.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../typed-json in E:\Developments\Projects\fenxiao\node_modules\typedjson\js\tests
@ ./~/typedjson/js/tests/polymorphism-custom-names.js 20:8-84
ERROR in ./~/typedjson/js/tests/polymorphism-interface.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../typed-json in E:\Developments\Projects\fenxiao\node_modules\typedjson\js\tests
@ ./~/typedjson/js/tests/polymorphism-interface.js 15:8-84
ERROR in ./~/typedjson/js/tests/polymorphism-nested-arrays.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../typed-json in E:\Developments\Projects\fenxiao\node_modules\typedjson\js\tests
@ ./~/typedjson/js/tests/polymorphism-nested-arrays.js 20:8-84
ERROR in ./~/typedjson/js/tests/polymorphism.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../typed-json in E:\Developments\Projects\fenxiao\node_modules\typedjson\js\tests
@ ./~/typedjson/js/tests/polymorphism.js 20:8-84
ERROR in ./~/typedjson/js/tests/single-class.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../typed-json in E:\Developments\Projects\fenxiao\node_modules\typedjson\js\tests
@ ./~/typedjson/js/tests/single-class.js 15:8-64
Do I need to set an exclude config or something I missed? Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >Webpack - No Output File, No Errors Reported · Issue #1736
I am learning Webpack and going through it again and again. In the latest build, there is something very strange going on.
Read more >How do I get full error messages out of webpack?
I am trying to use webpack to autoprefix / compile my scss. Here is my webpack.config.js (basically copy / paste of bootstrap's):
Read more >Output - webpack
webpack will not write output file when file already exists on disk with the same content.
Read more >Stats - webpack
'errors-warnings', none, Only output errors and warnings happen. 'minimal', none, Only output when errors or new compilation happen.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I updated
webpack.config.js. (needignore-loadernpm module)It only got two warnings now. 😆
UPDATED
Looks the WebStorm Autocomplete function caused this issue. Need to import like
import { xxx } from "typedjson/src/typed-json", And DO NOT use autocomplete likeimport { xxx } from "typedjson/js/index".Finally solved, and thanks for such a useful module.
It only output 2 warning messages.
The interesting thing is even it output some error, but still published a well-worked file 😄