question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrating from 0.9.5 to 1.0.0 > source-map-generator.js error

See original GitHub issue

Can you reproduce the problem with latest npm?

yes

Description

I followed the migration instructions.

Actually I first followed the instructions “How to turn my app into a Progressive Web App” because I had done this following the previous instructions some months ago. Then I ran npm start: app started up with no errors.

Then ran npm install --save-dev --save-exact react-scripts@1.0.0

App did not start, errors in console see below.

Nuked node-modules, ran npm i, then npm start. Still same errors.

Expected behavior

App starts up

Actual behavior

App hangs on startup. Messages in the console:

C:\Users\alex\apf2\node_modules\source-map\lib\source-map\source-map-generator.js:8 Uncaught Error: Cannot find module "."
    at webpackMissingModule (C:\Users\alex\apf2\node_modules\source-map\lib\source-map\source-map-generator.js:8)
    at Object.<anonymous> (C:\Users\alex\apf2\node_modules\source-map\lib\source-map\source-map-generator.js:8)
    at Object.<anonymous> (C:\Users\alex\apf2\node_modules\source-map\lib\source-map\source-map-generator.js:400)
    at __webpack_require__ (C:\Users\alex\apf2\webpack\bootstrap c96fbe2…:657)
    at fn (C:\Users\alex\apf2\webpack\bootstrap c96fbe2…:85)
    at Object.<anonymous> (C:\Users\alex\apf2\node_modules\source-map\lib\source-map.js:6)
    at __webpack_require__ (C:\Users\alex\apf2\webpack\bootstrap c96fbe2…:657)
    at fn (C:\Users\alex\apf2\webpack\bootstrap c96fbe2…:85)
    at Object.defineProperty.value (C:\Users\alex\apf2\node_modules\react-error-overlay\lib\utils\getSourceMap.js:1)
    at __webpack_require__ (C:\Users\alex\apf2\webpack\bootstrap c96fbe2…:657)

C:\Users\alex\apf2\node_modules\react-dev-utils\webpackHotDevClient.js:226 ./~/source-map/lib/source-map/source-map-generator.js
8:45-52 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected): react-scripts@1.0.0
  2. node -v: v7.10.0
  3. npm -v: 4.6.1

Then, specify:

  1. Operating system: Windows 10
  2. Browser and version: Chrome 58.0.3029.110 (64-bit)

Reproducible Demo

This is my app.

I really can’t face reducing this big project. I would probably produce a lot of new errors instead 😦

I’m hoping that others run into the same error and maybe have a less complex app which is easier to reduce.

What I did do is revert to “react-scripts”: “0.9.5”. Result: app starts without errors. Upgrade to “react-scripts”: “1.0.0”: App errors out again.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Timercommented, May 19, 2017

Ah, yes this replicates for me when using npm … I wonder what’s different.

1reaction
phillipjcommented, May 19, 2017

Forgot to mention, I see this in the npm output when installing cra@1.0.0:

└─┬ react-scripts@1.0.0

  ...

  ├─┬ UNMET PEER DEPENDENCY webpack@2.5.1
Read more comments on GitHub >

github_iconTop Results From Across the Web

getting error on validating JS functions after upgrading the ...
There's no such thing as call if(condition) in Karate, so if that was working in the past, it is a bug - and...
Read more >
Migration test error - M220JS - MongoDB
server@1.0.0 test C:\Users\Niwarthana\Downloads\mongodb\mflix-js jest --passWithNoTests “migration” Determining test suites to run…
Read more >
Migrating from 0.9 - Socket.IO
To print logging only from the socket object: DEBUG=socket.io:socket node index.js . This pattern should hopefully be making sense at this point ...
Read more >
Gulp error - Invalid Mapping + JSON.stringify - Roots Discourse
Once it was all updated, I ran gulp and am now getting this error: ... map/lib/source-map-generator.js:277 throw new Error('Invalid mapping: ...
Read more >
db migration error - Redmine
after upgrading to the latest trunk via svn and running the db migration, ... upgrading from redmine-0.9.5 to redmine-1.0.0 downloaded from Rubyforge.
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