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.

react-native init throws an error: Cannot find module './clone.js'

See original GitHub issue

Environment

No output. But I got this in old RN project:

Environment:
  OS: macOS High Sierra 10.13.3
  Node: 8.11.1
  Yarn: 0.24.5
  npm: 6.4.1
  Watchman: 4.9.0
  Xcode: Xcode 9.3.1 Build version 9E501
  Android Studio: 3.1 AI-173.4819257

Packages: (wanted => installed)
  react: NO RELEVANT
  react-native: NO RELEVANT

Description

react-native init <PROJECT_NAME> failed with this error:

Error: Cannot find module './clone.js'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/<PATH_TO_PROJECT>/node_modules/graceful-fs/graceful-fs.js:4:13)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

Reproducible Demo

Simply try to create new project: react-native init <PROJECT_NAME>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
gran33commented, Nov 2, 2018

Sure, it’s one of react-native dependencies that just published a fix (this is the fix commit isaacs/node-graceful-fs@a1587ea).

0reactions
alexsmartenscommented, Nov 2, 2018

I did not change package.json

Read more comments on GitHub >

github_iconTop Results From Across the Web

npx react-native init MainApp Giving error (code - Stack Overflow
I am new to this react native. node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module './error' Require stack: ...
Read more >
error: cannot find native module 'expolocalization' - You.com
React Native "Cannot find module 'react-native'" Problem ... 1 Answer. Remove your node_modules directory. Run npm install. Run npm start. The command npm...
Read more >
Solved: Cannot find module react : npm install - YouTube
How to Install Node Js in Windows 10 & set VsCode for NodeJs as an IDE - Node Js Tutorial 2019. Coding Cafe....
Read more >
node-fetch - npm
A light-weight module that brings Fetch API to node.js. Latest version: 3.3.0, last published: 2 months ago. Start using node-fetch in your ...
Read more >
npx create-react-app my-app DOES NOT work : r/reactjs - Reddit
... node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module 'C:\Users\create-react-app\index.js' 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