Error when including in project
See original GitHub issueHello. Congrats for this amazing tool, cant wait to use it!
I tried including it in my current setup, runing tests with karma and mocha, and using Chai. You can see setup here:
https://github.com/davezuko/react-redux-starter-kit
The error comes when importing the module like the other ones:
wich should work perfectly. But I get a ton of errors:
WARNING in ./~/chai-jest-snapshot/~/jest-snapshot/build/SnapshotFile.js
Critical dependencies:
67:37-44 require function is used in a way in which dependencies cannot be statically extracted
@ ./~/chai-jest-snapshot/~/jest-snapshot/build/SnapshotFile.js 67:37-44
ERROR in ./~/chai-jest-snapshot/~/jest-snapshot/~/jest-util/build/index.js
Module not found: Error: Cannot resolve module 'fs' in /myProject/node_modules/chai-jest-snapshot/node_modules/jest-snapshot/node_modules/jest-util/build
@ ./~/chai-jest-snapshot/~/jest-snapshot/~/jest-util/build/index.js 13:11-24
SyntaxError: Unexpected token 'const'
at webpack:///~/chai-jest-snapshot/~/jest-snapshot/build/SnapshotFile.js:12:0 <- tests/test-bundler.js:113068
Apparently webpack is having some trouble using some core node modules?? Im very confused. Any light you could shed would be amazing.
thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Visual Studio link error when including headers from another ...
cpp file in another directory. In Visual Studio 2008, I created a new project and put main.cpp in that project. I added the...
Read more >Project build errors and warnings (PRJxxxx) - Microsoft Learn
The Visual Studio compilers and build tools can report many kinds of errors and warnings. After an error or warning is found, the...
Read more >VS 2017 15.3 files not included in project
When I create a new ASP.NET Core web application project (or any other type of project), almost all files are invisible in the...
Read more >how to view a count of compiler errors in a project
when i build a project, the output flashes by and then i see the build/problems view. this is pretty useful but i haven't...
Read more >[Compile Error] missing include files (IntelliSense)
The error message indicates, that the file is not in the include search path. This path should be added when you create the...
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 FreeTop 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
Top GitHub Comments
You might find use in https://www.npmjs.com/package/mocha-webpack
@suchipi Thank you very much for the detailed explanation, now I understand where is the problem. I think Im going to focus more on trying to get the snapshot working independently from webpack since this looks like a though task, and I can’t invest much more time in it 😄 I will probably return to tackle it in the future, so if I get any clear results, I will get back to you. Thanks!