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.

Cannot find module './Module' Error at module.js:487

See original GitHub issue

I really getting stuck while trying to run react-native init AwesomProject on windows 7 the following error is occurring,

image

I have already tried following,

  • yarn : latest
  • node : 6.11.0 and 8.11.3
  • npm : 4 and 5
  • reinstalled react-native-cli
  • restarted pc several time.

One thing is that it was all going perfectly before 1 hour.

Complete Output

` $ react-native init hello3 This will walk you through creating a new React Native project in D:\react\hello 3 Using yarn v0.27.5 Installing react-native… yarn add v0.27.5 info No lockfile found. [1/4] Resolving packages… [2/4] Fetching packages… [3/4] Linking dependencies… warning “react-native@0.46.0” has unmet peer dependency “react@16.0.0-alpha.12”. [4/4] Building fresh packages… success Saved lockfile. success Saved 469 new dependencies. ├─ absolute-path@0.0.0 ├─ accepts@1.2.13 ├─ ajv@4.11.8 ├─ assert-plus@1.0.0 ├─ async@2.5.0 . . . . ├─ yargs-parser@4.2.1 └─ yargs@6.6.0 Done in 53.86s. module.js:487 throw err; ^

Error: Cannot find module ‘./Module’ at Function.Module._resolveFilename (module.js:485:15) at Function.Module._load (module.js:437:25) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at Object.<anonymous> (D:\react\hello3\node_modules\metro-bundler\build\node -haste\DependencyGraph.js:19:16) at Module._compile (module.js:569:30) at Module._extensions…js (module.js:580:10) at Object.require.extensions.(anonymous function) [as .js] (D:\react\hello3\ node_modules\babel-register\lib\node.js:152:7) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12)`

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:17

github_iconTop GitHub Comments

32reactions
AishwaryaSuranacommented, Sep 7, 2017

This helped me Try removing node modules

rm -r node_modules Reinstall node modules by:

npm install

or

yarn install

1reaction
Ariven1commented, Nov 20, 2017

I solved this issue by doing the following

  1. C: drive -> Users -> “username” eg. john -> AppData -> Roaming

  2. Inside the “Roaming” folder you need to delete both “npm” and “npm-cache” folder.

  3. Now build your project, and it should work

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Cannot find module 'typescript' in Angular 4?
For me just running the below command is not enough (though a valid first step): npm install -g typescript. The following command is...
Read more >
Error Cannot find module webpack lib node ... - Edureka
Got this Error after running webpack. Webpack is installed globally and I'm running Node PS D:\Projects .
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
Why the "Error: cannot find module" Occurs. This error occurs because of the following reasons: you're trying to import an item from a ......
Read more >
Babel Problem : Cannot find module - Big Nerd Ranch Forums
but it doesn't work, I've got this error on my console: Error: Cannot find module '…/modules/web.dom.iterable' (While processing preset: ...
Read more >
Cannot find module 'rollup' - Setup - ERPNext Forum
16.0 $ FRAPPE_ENV=production node rollup/build.js module.js:487 throw err; ^ Error: Cannot find module 'rollup' at Function.Module.
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