Module not found: Error: Cannot resolve module 'module' in [...]source-map-support @ source-map-support.js 464:17-34
See original GitHub issueI am using source-map-support
0.4.5
in a module of mine (let’s call it moduleA
).
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 it moduleUser
). After I do npm install
in moduleUser
I try to do an npm run build
which is configured in package.json
as:
$ grep \"build\"\: package.json
"build": "webpack --progress --colors",
… 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.js Module 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-34
Looking in the identified location in file source-map-support.js
the line is:
var Module = require('module');
Issue Analytics
- State:
- Created 7 years ago
- Reactions:21
- Comments:29
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 still see this issue in 0.4.11.