Source maps make build fail when including source from outside the directory
See original GitHub issueHi! I’m trying out severless-bundle and it seems to do wonders! Thank you.
My Lambda includes a function from outside the Lambda folder, like so:
const myForeignFunction = require("../library/index");
As long as I set sourcemaps: false
, it all works like a charm. I can deploy the Lambda, and Webpack makes the foreign function available. But, if I want my sourcemaps enabled (which I do…), sls deploy
fails with this error:
ERROR in /home/user/Projects/myproject/library/index.js
Module not found: Error: Can't resolve 'source-map-support/register' in '/home/user/Projects/myproject/library'
What am I doing wrong? Is this not the Right Way to include code from outside the Lambda directory?
Thank you!
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
After Upgrading to CRA 5.0 getting a lot of: Failed to parse ...
The best solution is to open a issue or pullrequest on that packages. The warnings are correct. These packages source maps pointing to...
Read more >4 Reasons Why Your Source Maps are Broken - Sentry Blog
Missing original source files This likely means that your source map doesn't contain or link to your original source files. Without your ...
Read more >Failed to parse source map - Stack Overflow
In the node_modules folder I have the @AAA/BBB folder with /dist/cjs and /dist/esm. I dont know what can produce the search in /src...
Read more >Should I Use Source Maps in Production? | CSS-Tricks
A “source map” is a special file that connects a minified/uglified version of an asset (CSS or JavaScript) to the original authored version....
Read more >Improving Development with Source Maps for Debugging
With source maps, we can trace the error back to our code, making it ... a deal to locate the source of that...
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
I’d like to know as well I am experiencing the same issue!
Any update on this? Having the same issue when importing functions from outside the directory