Repository navigation
Migrating from 0.9.5 to 1.0.0 > source-map-generator.js error #2232
Description
Activity
Thanks for reporting. Will look later today!
also happens on my macOS Sierra notebook
Reacted by Anastasiia (Plakhtii) OlenchenkoIf you'd like to dig into why this happens (or have a smaller repro case) I’d appreciate it!
The update worked flawlessly in another project of mine so obviously this error has to do with project specifics :-(
@Timer might have more insight than me here.
Just cloned your project and upgraded react-scripts; I can't get this to reproduce.
Can you please push me a branch (or direct me to one) with this happening? Thanks!
Scratching my head...
This happens to me when using master.
I now nuked my entire project locally, cloned it from github, updated react-scripts to 1.0.0. And get the error again.
??
Anyway: thanks a lot for caring!
@Timer : do you also get this warning (which I get following the error):
./~/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 extractedSeeing this on a project of mine as well, which also uses storybooks. Made a repo that reproduces this on my machine: https://github.com/phillipj/create-react-app-v1-upgrade
OS: macOS v10.11.6
Node.js/npm: v6.10.3/v3.10.10Steps made to create the project above:
$ create-react-app --scripts-version=0.9.5 . $ getstorybook $ npm install --save-dev --save-exact react-scripts@1.0.0 npm WARN extract-text-webpack-plugin@2.1.0 requires a peer of webpack@^2.2.0 but none was installed. npm WARN webpack-dev-server@2.4.5 requires a peer of webpack@^2.2.0 but none was installed. $ npm ls webpack create-react-app-v1-upgrade@0.1.0 /create-react-app-v1-upgrade └─┬ @kadira/storybook@2.35.3 └── webpack@1.14.0I do not get that warning, but I'm using yarn. Let me try again with npm.
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
Reacted by danAh, yes this replicates for me when using npm ... I wonder what's different.
Reacted by John Darryl PelingoSeems NPM is deduping the wrong package, but it shouldn't cause webpack to acquire the incorrect version...
package trees
Yarn: ``` Joes-MacBook-Pro:apf2 joe$ npm ls source-map apf2@0.1.0 /Users/joe/Desktop/temp/apf2 ├─┬ leaflet-measure@2.1.7 │ └─┬ brfs@1.4.3 │ └─┬ static-module@1.3.2 │ ├─┬ escodegen@1.3.3 │ │ └── source-map@0.1.43 │ └─┬ static-eval@0.2.4 │ └─┬ escodegen@0.0.28 │ └── source-map@0.5.6 deduped └─┬ react-scripts@1.0.0 ├─┬ autoprefixer@7.1.0 │ └─┬ postcss@6.0.1 │ └── source-map@0.5.6 deduped ├─┬ babel-core@6.24.1 │ ├─┬ babel-generator@6.24.1 │ │ └── source-map@0.5.6 deduped │ ├─┬ babel-register@6.24.1 │ │ └─┬ source-map-support@0.4.15 │ │ └── source-map@0.5.6 deduped │ └── source-map@0.5.6 ├─┬ css-loader@0.28.1 │ ├─┬ cssnano@3.10.0 │ │ └─┬ postcss-svgo@2.1.6 │ │ └─┬ svgo@0.7.2 │ │ └─┬ csso@2.3.2 │ │ └── source-map@0.5.6 deduped │ └─┬ postcss@5.2.17 │ └── source-map@0.5.6 deduped ├─┬ extract-text-webpack-plugin@2.1.0 │ └─┬ webpack-sources@0.1.5 │ └── source-map@0.5.6 deduped ├─┬ html-webpack-plugin@2.28.0 │ └─┬ html-minifier@3.5.0 │ ├─┬ clean-css@4.1.3 │ │ └── source-map@0.5.6 deduped │ └─┬ uglify-js@3.0.9 │ └── source-map@0.5.6 deduped ├─┬ jest@20.0.3 │ └─┬ jest-cli@20.0.3 │ ├─┬ istanbul-api@1.1.8 │ │ └─┬ istanbul-reports@1.1.0 │ │ └─┬ handlebars@4.0.8 │ │ └── source-map@0.4.4 │ ├─┬ istanbul-lib-source-maps@1.2.0 │ │ └── source-map@0.5.6 deduped │ └─┬ jest-environment-jsdom@20.0.3 │ └─┬ jsdom@9.12.0 │ └─┬ escodegen@1.8.1 │ └── source-map@0.2.0 ├─┬ postcss-flexbugs-fixes@3.0.0 │ └─┬ postcss@6.0.1 │ └── source-map@0.5.6 deduped ├─┬ postcss-loader@2.0.5 │ └─┬ postcss@6.0.1 │ └── source-map@0.5.6 deduped ├─┬ react-dev-utils@1.0.0 │ └─┬ stack-frame-mapper@0.4.0 │ └─┬ stack-frame-utils@0.4.0 │ └── source-map@0.5.6 deduped ├─┬ sw-precache-webpack-plugin@0.9.1 │ └─┬ uglify-js@2.8.26 │ └── source-map@0.5.6 deduped └─┬ webpack@2.5.1 ├── source-map@0.5.6 deduped └─┬ webpack-sources@0.2.3 └── source-map@0.5.6 deduped ```NPM:
Joes-MacBook-Pro:apf2 joe$ npm ls source-map apf2@0.1.0 /Users/joe/Desktop/temp/apf2 ├─┬ leaflet-measure@2.1.7 │ └─┬ brfs@1.4.3 │ └─┬ static-module@1.3.2 │ ├─┬ escodegen@1.3.3 │ │ └── source-map@0.1.43 │ └─┬ static-eval@0.2.4 │ └─┬ escodegen@0.0.28 │ └── source-map@0.1.43 deduped └─┬ react-scripts@1.0.0 ├─┬ autoprefixer@7.1.0 │ └─┬ postcss@6.0.1 │ └── source-map@0.5.6 ├─┬ babel-core@6.24.1 │ ├─┬ babel-generator@6.24.1 │ │ └── source-map@0.5.6 │ ├─┬ babel-register@6.24.1 │ │ └─┬ source-map-support@0.4.15 │ │ └── source-map@0.5.6 │ └── source-map@0.5.6 ├─┬ css-loader@0.28.1 │ ├─┬ cssnano@3.10.0 │ │ ├─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-calc@5.3.1 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-colormin@2.2.2 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-convert-values@2.6.1 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-discard-comments@2.0.4 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-discard-duplicates@2.1.0 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-discard-empty@2.1.0 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-discard-overridden@0.1.1 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-discard-unused@2.2.3 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-filter-plugins@2.0.2 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-merge-idents@2.1.7 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-merge-longhand@2.0.2 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-merge-rules@2.1.2 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-minify-font-values@1.0.5 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-minify-gradients@1.0.5 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-minify-params@1.2.2 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-minify-selectors@2.1.1 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-normalize-charset@1.1.1 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-normalize-url@3.0.8 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-ordered-values@2.2.3 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-reduce-idents@2.4.0 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-reduce-initial@1.0.1 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-reduce-transforms@1.0.4 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-svgo@2.1.6 │ │ │ ├─┬ postcss@5.2.17 │ │ │ │ └── source-map@0.5.6 │ │ │ └─┬ svgo@0.7.2 │ │ │ └─┬ csso@2.3.2 │ │ │ └── source-map@0.5.6 │ │ ├─┬ postcss-unique-selectors@2.0.2 │ │ │ └─┬ postcss@5.2.17 │ │ │ └── source-map@0.5.6 │ │ └─┬ postcss-zindex@2.2.0 │ │ └─┬ postcss@5.2.17 │ │ └── source-map@0.5.6 │ ├─┬ postcss@5.2.17 │ │ └── source-map@0.5.6 │ ├─┬ postcss-modules-extract-imports@1.0.1 │ │ └─┬ postcss@5.2.17 │ │ └── source-map@0.5.6 │ ├─┬ postcss-modules-local-by-default@1.1.1 │ │ └─┬ postcss@5.2.17 │ │ └── source-map@0.5.6 │ ├─┬ postcss-modules-scope@1.0.2 │ │ └─┬ postcss@5.2.17 │ │ └── source-map@0.5.6 │ └─┬ postcss-modules-values@1.2.2 │ └─┬ postcss@5.2.17 │ └── source-map@0.5.6 ├─┬ extract-text-webpack-plugin@2.1.0 │ └─┬ webpack-sources@0.1.5 │ └── source-map@0.5.6 ├─┬ html-webpack-plugin@2.28.0 │ └─┬ html-minifier@3.5.0 │ ├─┬ clean-css@4.1.3 │ │ └── source-map@0.5.6 │ └─┬ uglify-js@3.0.9 │ └── source-map@0.5.6 ├─┬ jest@20.0.3 │ └─┬ jest-cli@20.0.3 │ ├─┬ istanbul-api@1.1.8 │ │ └─┬ istanbul-reports@1.1.0 │ │ └─┬ handlebars@4.0.8 │ │ ├── source-map@0.4.4 │ │ └─┬ uglify-js@2.8.27 │ │ └── source-map@0.5.6 │ ├─┬ istanbul-lib-source-maps@1.2.0 │ │ └── source-map@0.5.6 │ └─┬ jest-environment-jsdom@20.0.3 │ └─┬ jsdom@9.12.0 │ └─┬ escodegen@1.8.1 │ └── source-map@0.2.0 ├─┬ react-dev-utils@1.0.0 │ └─┬ stack-frame-mapper@0.4.0 │ └─┬ stack-frame-utils@0.4.0 │ └── source-map@0.5.6 ├─┬ sw-precache-webpack-plugin@0.9.1 │ └─┬ uglify-js@2.8.27 │ └── source-map@0.5.6 └─┬ webpack@2.5.1 ├── source-map@0.5.6 ├─┬ uglify-js@2.8.27 │ └── source-map@0.5.6 deduped └─┬ webpack-sources@0.2.3 └── source-map@0.5.6 deduped- added a commit that references this issue
on May 19, 2017 Fix up in #2243
- added a commit that references this issue
on May 19, 2017 thanks guys, you are amazing!
react-scripts@1.0.1should be out with a fix.
Can you please verify it helps?works like a charm :-)
- added a commit that references this issue
on Jul 10, 2017 - added a commit that references this issue
on Aug 2, 2017 - locked and limited conversation to collaborators
on Jan 21, 2019 - added a commit that references this issue
on Oct 8, 2024
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.0App did not start, errors in console see below.
Nuked node-modules, ran
npm i, thennpm start. Still same errors.Expected behavior
App starts up
Actual behavior
App hangs on startup. Messages in the console:
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts(if you haven’t ejected): react-scripts@1.0.0node -v: v7.10.0npm -v: 4.6.1Then, specify:
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.