Error: Cannot find module 'react-static-routes' in 5.0.0-beta.1
Hello, this report is similar to #56 but with more recent versions:
pablo ~/P/react-static> react-static -v
5.0.0-beta.1
pablo ~/P/react-static> react-static create
? What should we name this project? my-static-site
? Select a template below... basic
=> Creating new react-static project...
=> Installing dependencies with: Yarn...
warning react-static > [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
warning react-static > [email protected]: We're super 😸 excited that you're trying to use ES2017+ syntax, but instead of making more yearly presets 😭 , Babel now has a better preset that we recommend you use instead: npm install babel-preset-env --save-dev. preset-env without options will compile ES2015+ down to ES5 just like using all the presets together and thus is more future proof. It also allows you to target specific browsers so that Babel can do less work and you can ship native ES2015+ to user 😎 ! We are also in the process of releasing v7, so please give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and help test it out in beta! Thanks so much for using Babel 🙏, please give us a follow on Twitter @babeljs for news on Babel, join slack.babeljs.io for discussion/development and help support the project at opencollective.com/babel
warning react-static > babel-preset-latest > [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
warning react-static > babel-preset-latest > [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
warning eslint-config-react-tools > [email protected]: please use eslint-plugin-babel and babel/semi
warning "[email protected]" has unmet peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc".
warning "[email protected]" has unmet peer dependency "eslint-plugin-class-property@^1.0.6".
warning "[email protected]" has unmet peer dependency "eslint-plugin-import@^2.7.0".
warning "[email protected]" has unmet peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "[email protected]" has unmet peer dependency "eslint-plugin-react@^7.1.0".
warning "[email protected]" has incorrect peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "[email protected]" has unmet peer dependency "eslint-plugin-class-property@^1.0.6".
warning "[email protected]" has unmet peer dependency "eslint-plugin-import@^2.7.0".
warning "[email protected]" has unmet peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "[email protected]" has unmet peer dependency "eslint-plugin-react@^7.1.0".
warning "[email protected]" has incorrect peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "[email protected]" has unmet peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc".
=> [✓] Project "my-static-site" created: 19584.995ms
=> To get started:
cd my-static-site
yarn start - Start the development server
yarn build - Build for production
yarn serve - Test a production build locally
pablo ~/P/r/my-static-site> yarn build
yarn run v1.2.1
$ react-static build
=> Copying public directory...
=> [✓] Public directory copied: 1.631ms
=> Building Routes...
=> [✓] Routes Built: 114.694ms
=> Bundling App...
=> [✓] App Bundled: 4843.633ms
=> Exporting Routes...
{ Error: Cannot find module 'react-static-routes'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/pablo/Projects/react-static/my-static-site/node_modules/react-static/lib/index.js:459:26)
at Module._compile (module.js:635:30)
at Module._extensions..js (module.js:646:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/pablo/Projects/react-static/my-static-site/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.module.exports.module.deprecate (/Users/pablo/Projects/react-static/my-static-site/dist/static.efa515fe.js:86:18)
at __webpack_require__ (/Users/pablo/Projects/react-static/my-static-site/dist/static.efa515fe.js:30:30)
at Object.defineProperty.value (/Users/pablo/Projects/react-static/my-static-site/dist/static.efa515fe.js:523:20) code: 'MODULE_NOT_FOUND' }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Node: 8.9.1
See also attached package.json and yarn.lock: https://gist.github.com/pdjota/a37f7e74649627b7a1e0539f3d7c9727
Ditto, ran into error just now on Linux, npm 5.6.0, node v9.4.0, no yarn
$ npm i -g react-static
$ react-static create # project name: test-static, template: basic
$ cd test-static
$ npm start # works fine, used Ctrl-c to exit
$ npm run build
> [email protected] build /home/jeff/Academic/web/test-static
> react-static build
=> Copying public directory...
=> [✓] Public directory copied: 1.073ms
=> Building Routes...
=> [✓] Routes Built: 271.796ms
=> Bundling App...
=> [✓] App Bundled: 4492.806ms
=> Exporting Routes...
{ Error: Cannot find module 'react-static-routes'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/jeff/Academic/web/test-static/node_modules/react-static/lib/index.js:459:26)
at Module._compile (module.js:660:30)
at Module._extensions..js (module.js:671:10)
at Object.require.extensions.(anonymous function) [as .js] (/home/jeff/Academic/web/test-static/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.module.exports.module.deprecate (/home/jeff/Academic/web/test-static/dist/static.1261b4c2.js:86:18)
at __webpack_require__ (/home/jeff/Academic/web/test-static/dist/static.1261b4c2.js:30:30)
at Object.defineProperty.value (/home/jeff/Academic/web/test-static/dist/static.1261b4c2.js:523:20) code: 'MODULE_NOT_FOUND' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-static build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jeff/.npm/_logs/2018-01-31T02_36_18_714Z-debug.log
Confirming an issue on Mac!
Justfly:taxi-static justfly$ npm start
> [email protected] start /Users/user/projects/test-static
> react-static start
{ Error: Cannot find module 'react-static-routes'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/user/projects/project-static/node_modules/react-static/lib/index.js:459:26)
at Module._compile (module.js:660:30)
at Module._extensions..js (module.js:671:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/user/projects/project-static/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12) code: 'MODULE_NOT_FOUND' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-static start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-01-31T06_39_25_227Z-debug.log
Known issue with the beta. Stick to stable release for a bit longer 👍 On Tue, Jan 30, 2018 at 11:47 PM Alexey Lyakhov [email protected] wrote:
Confirming an issue on Mac!
Justfly:taxi-static justfly$ npm start
[email protected] start /Users/user/projects/test-static react-static start
{ Error: Cannot find module 'react-static-routes' at Function.Module._resolveFilename (module.js:555:15) at Function.Module._load (module.js:482:25) at Module.require (module.js:604:17) at require (internal/module.js:11:18) at Object.
(/Users/user/projects/project-static/node_modules/react-static/lib/index.js:459:26) at Module._compile (module.js:660:30) at Module._extensions..js (module.js:671:10) at Object.require.extensions.(anonymous function) [as .js] (/Users/user/projects/project-static/node_modules/babel-register/lib/node.js:152:7) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) code: 'MODULE_NOT_FOUND' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: react-static startnpm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /Users/user/.npm/_logs/2018-01-31T06_39_25_227Z-debug.log
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nozzle/react-static/issues/326#issuecomment-361840049, or mute the thread https://github.com/notifications/unsubscribe-auth/AFUmCWDR5maojL09MRzJ1iMH1l4JKnMKks5tQAx7gaJpZM4Ry4Xt .
Retried with "4.8.5" supposed stable but I get the same error:
pablo@L198 ~/P/r/statico> react-static -v
4.8.5
pablo@L198 ~/P/r/statico> yarn build
yarn run v1.2.1
$ react-static build
=> Copying public directory...
=> [✓] Public directory copied: 1.447ms
=> Building Routes...
=> [✓] Routes Built: 164.084ms
=> Bundling App...
=> [✓] App Bundled: 5525.410ms
=> Exporting Routes...
{ Error: Cannot find module 'react-static-routes'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/pablo/Projects/react-static/statico/node_modules/react-static/lib/index.js:459:26)
at Module._compile (module.js:635:30)
at Module._extensions..js (module.js:646:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/pablo/Projects/react-static/statico/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.module.exports.module.deprecate (/Users/pablo/Projects/react-static/statico/dist/static.aa755793.js:86:18)
at __webpack_require__ (/Users/pablo/Projects/react-static/statico/dist/static.aa755793.js:30:30)
at Object.defineProperty.value (/Users/pablo/Projects/react-static/statico/dist/static.aa755793.js:523:20) code: 'MODULE_NOT_FOUND' }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Any particular version to use?
Can you please point to stable version?
If it's not stable, why was it the default install when I typed npm install -g react-static? ლ(¯ロ¯"ლ) And ditto - what is the current stable version?
I would have thought that a package's latest verison would be stable, and one would have to specify the tag if one wanted an unstable version.
Got the same issue. Even 4.8.5 does not work for me as well...
same here. 4.8.5 has issues. It would be nice to tell what the stable version is.
5.0.0 should not show this error anymore
If you are trying to use 4.8.5, you must be sure you are in a clean working environment.
- Add
[email protected]as a dependency - Remove your node_modules and install them again
- Make sure you are not trying to use the new 5.0.0 api with 4.x.x