Cannot find module Source-map-support
See original GitHub issueHi, I’m trying to push my build on production and I’m getting this error
Cannot find module '/Users/NAME/FOLDER/PROJECT_NAME/node_modules/source-map-support/source-map-support.js'
Anyone know how to fix this?
Thank you very much!
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Jest - Cannot find module 'source-map' from ... - Stack Overflow
I've got the problem that I get the error: Cannot find module 'source-map' from 'source-map-support.js' Ran all test suites matching ...
Read more >[Bug?]: jest fails with Cannot find module 'source-map-support ...
Self-service I'd be willing to implement a fix Describe the bug I'm currently trying to migrate from the PnP linker to pnpm.
Read more >source-map-support - npm
Start using source-map-support in your project by running `npm i source-map-support`. There are 6717 other projects in the npm registry ...
Read more >Error: Cannot find module 'source-map' - Appium Discuss
Error: Cannot find module 'source-map' ... \AppData\Roaming\npm\node_modules\appium\node_modules\source-map-support\source-map-support.js ...
Read more >node_modules/source-map-support · master - Gitlab inria
This module provides source map support for stack traces in node via the V8 ... the V8 engine doesn't and Error.prototype.stack will be...
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’m having this issue when I try to run this on Docker. I have a build stage that compiles the
build/main.jsbundle and then removes all dev deps and any files that my app doesn’t need, then I have another step that simply runsnpm start. In theory that should be enough but into the same issue.@thierryskoda When I pushed the change in
0.0.9I had a feeling this would be an issue. The problem is thatlernadoesn’t handle the local npm symlink properly without thatrequire.resolve(), which makes developing backpack really really annoying. We need to figure out a better solution.As a workaround you should remove
webpack.BannerPlugin()usingbackpack.config.js, addsource-map-supportas a dependency (npm i source-map-support), and then addimport 'source-map-support/register'to the top of your entry file (src/index.jsor whatever).Nowadays our build servers are the same VMs as our production machines so paths always match. However, I know that is not the case for everyone, especially for people using SaaS CI’s and many PaaS providers. When we used to use Heroku with webpack or grunt, we used the
postinstallnpm script where we ran our build step.For example: