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.

Error: Cannot find module 'react-static-routes' in 5.0.0-beta.1

See original GitHub issue

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 > babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! 
warning react-static > babel-preset-latest@6.24.1: 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 > babel-preset-es2017@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! 
warning react-static > babel-preset-latest > babel-preset-es2016@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! 
warning eslint-config-react-tools > eslint-plugin-class-property@1.1.0: please use eslint-plugin-babel and babel/semi
warning "babel-loader@7.1.2" has unmet peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc".
warning "eslint-config-react-tools@1.1.2" has unmet peer dependency "eslint-plugin-class-property@^1.0.6".
warning "eslint-config-react-tools@1.1.2" has unmet peer dependency "eslint-plugin-import@^2.7.0".
warning "eslint-config-react-tools@1.1.2" has unmet peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "eslint-config-react-tools@1.1.2" has unmet peer dependency "eslint-plugin-react@^7.1.0".
warning "eslint-config-airbnb@15.1.0" has incorrect peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "eslint-config-react-tools@1.1.2" has unmet peer dependency "eslint-plugin-class-property@^1.0.6".
warning "eslint-config-react-tools@1.1.2" has unmet peer dependency "eslint-plugin-import@^2.7.0".
warning "eslint-config-react-tools@1.1.2" has unmet peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "eslint-config-react-tools@1.1.2" has unmet peer dependency "eslint-plugin-react@^7.1.0".
warning "eslint-config-airbnb@15.1.0" has incorrect peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "babel-loader@7.1.2" 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

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
tannerlinsleycommented, Jan 31, 2018

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 react-static@4.8.5 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
1reaction
kaladivocommented, Jan 31, 2018

Got the same issue. Even 4.8.5 does not work for me as well…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >
Issues - GitHub
Hi, I could install my service, but I can´t start it. This is my error detail. Error: Cannot find module '@author.io/args' Require stack:....
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
In my case, I got it like this "Module not found: Error: Can't resolve 'react-icons/fa' in 'C:\Users\user\Desktop\Projects\Address Locator\ ...
Read more >
testing - Meteor forums
This is an issue that started occurring after attempting to get a working test setup using Jest. The test itself is running just...
Read more >
[Solution] Error: Cannot Find Module "nodemailer" - Courier
js project that creates an empty package.json file. Afterward, install the nodemailer library using the command shown below. 1 ...
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