-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not found: Error: Cannot resolve module 'module' in [...]source-map-support @ source-map-support.js 464:17-34 #155
Comments
Also started receiving this same error on our production builds. |
Receiving this as well |
You can circumvent it by adding source-map-support@0.4.3 to your On Oct 24, 2016 12:40 PM, "Jeff Knight" notifications@github.com wrote:
|
Having
… actually fetches
… and the same problem persists after npm-publishing the package and using it from another project. |
@mperdikeas So remove the |
Nailing the |
I've been seeing the same issue, and likewise ended up pinning to |
Any chance this is going to get fixed? Stuck on |
Same issue here. |
Hmm, I thought that we fixed this, is still a problem in 0.4.8? edit: maybe not after all... it's probably just a matter of wrapping |
I still see this issue in 0.4.11. |
Still seeing it in |
Still seeing in 0.5.0 😢 removing '^' from package.json does not solve the issue |
I am using Angular 5, Angular cli 1.5.2 and everything was fine until I added and used My error starts with
And continues something like 1000 more lines... Not sure what I can do about it. Any idea?
|
Seeing the same issue in 0.5.1, as well as unresolved 'fs' module. The following addition to the top level of my webpack.config.js fixes it:
|
I have a similar issue:
For anyone having the issue with the Next.js library, here is the workaround:
module.exports = {
webpack: (config, { buildId, dev, isServer, defaultLoaders }) => {
config.node = {
fs: 'empty',
module: "empty",
};
return config;
},
}; |
attention |
I still see this issue in 0.5.4. |
I have this issue with
And I think babel-core uses 0.4.18 no matter of source-map-support installed package on top level. But the issue interesting. AMD vs. CJS. Then I changed my webpack.config.js and added one more line:
And issue gone. Partially. Such behavior is odd :) Just imagine, 2018 year, we work on NPM modules, module is essential for require/CJS and we have to add some explicit code to "see" it :) But it's not the end.
And here is my piece of code:
In fact my I manage code to provide ANyway, I changed my code to this:
And now webpack/react based app at least works with no errors. But still, it's no ideal fix I assume. |
I don't know what am doing wrong please someone help take a look at my config and how i tried to apply the workaround. `var Encore = require('symfony/webpack-encore'); Encore
/trying to add the work around here and i get error/
; module.exports = Encore.getWebpackConfig();` when i run
error Command failed with exit code 1. |
Is there any solution for this problem yet? facing the same thing. |
I am getting error when running angular 5 application using npm command. ERROR in ./node_modules/source-map-support/source-map-support.js |
What worked for me was deleting my instance of yarn and webencore then reinstalling it. sorry for the late reply |
can you confirm that this (source-map-support' )was installed to your node_modules dir ? |
I get same error |
@mperdikeas, @nogo10, and anyone else in this thread; could you try #273 and see if that fixes the problem for you? |
To test it I copy pasted source-map-support.js code fix at #273 to replace instances in my app packages that use source-map-support. Seems to work: I no longer get the |
Fixed in version 0.5.19 🚀 |
To fix this I noticed that sourcemap was installed under myproject/node_modules/css_loader/node_modules/source-map/source-map.js I grabbed the file, renamed it sourceMaps.js and saved it here: myproject/node_modules/css_loader/dist/runtime/sourceMaps.js That fixed it. My guess is that the sourceMaps file has the same logic in most cases, but is setup in a different directory now than in the past. I'm guessing that the structure changed for how the node_modules subfolders get setup within css-loader. Probably older versions still assume that the necessary file lives at /dist/runtime/sourceMaps.js Probably there's a way to remap where the project is looking for sourceMaps.js and what it is called, but I find that copy and pasting a file is much simpler and seems appropriately mundane. |
I am using
source-map-support
0.4.5
in a module of mine (let's call itmoduleA
).I then publish
moduleA
to npm and all's well till that point.Then I try to use that
moduleA
in another project of mine (let's call itmoduleUser
). After I donpm install
inmoduleUser
I try to do annpm run build
which is configured inpackage.json
as:… and I then encounter (at the end of the build process) the following message which I can't decipher:
ERROR in ../
/moduleA//source-map-support/source-map-support.jsModule not found: Error: Cannot resolve module 'module' in /home/carsten/moduleUser/node_modules/moduleA/node_modules/source-map-support
@ ../
/moduleA//source-map-support/source-map-support.js 464:17-34Looking in the identified location in file
source-map-support.js
the line is:The text was updated successfully, but these errors were encountered: