Error: Cannot find module './lib/source-map-generator'

See original GitHub issue

I opened an old project and getting this error suddenly… Any ideas how to fix?

Error: Cannot find module './lib/source-map-generator'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/hese/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/source-map/source-map.js:6:30)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

24reactions
terinjokescommented, Apr 11, 2016

@Hesesses Looks like your “node_modules” folder is incomplete. Try removing it and run npm install again.

4reactions
var-checommented, Oct 24, 2018

If you can’t remove node_modules file, you can try this:

Install RimRaf:

npm install rimraf -g

And in the project folder delete the node_modules folder with:

rimraf node_modules

Then you can go and do npm install to get the fresh start.

Read more comments on GitHub >

github_iconTop Results From Across the Web

2 - Stack Overflow
Error : Cannot find module './lib/source-map-generator' · Ask Question. Asked 8 months ago. Modified 7 months ago. Viewed 4k ...
Read more >
Error: Cannot find module 'source-map' - Appium Discuss
Hello everyone, I need help from you guys. this is the first time I installed Appium on my PC and I already installed...
Read more >
cannot find module 'source-map' - You.com | The AI Search ...
If you're receiving an error that states "Cannot find module 'source-map'", it is likely because the source-map package is not installed [1][2]. To...
Read more >
ionic-v1
When I tried to add android paltform I faced with this error: Error: Cannot find module './source-map/source-map-generator'
Read more >
source-map - npm
When using SourceMapConsumer outside of node.js, for example on the Web, it needs to know from what URL to load lib/mappings.wasm . You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found