Skip to content

Error In Create React Native App #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aayanqazi opened this issue Mar 14, 2017 · 14 comments
Closed

Error In Create React Native App #59

aayanqazi opened this issue Mar 14, 2017 · 14 comments

Comments

@aayanqazi
Copy link

aayanqazi commented Mar 14, 2017

Creating a new React Native app in F:\He.

Installing packages. This might take a couple minutes.
Installing react-native-scripts...

C:\Users\Arsalan Sabir\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js:61
      

throw err;
      ^

Error: ENOENT: no such file or directory, open 'C:\Users\Arsalan Sabir\AppData\Roaming\npm\node_modules\yarn\node_modules\end-of-stream\node_modules\once\once.js'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.readFileSync (fs.js:508:33)
    at Object.Module._extensions..js (module.js:578:20)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\Arsalan Sabir\AppData\Roaming\npm\node_modules\yarn\node_modules\end-of-stream\index.js:1:74)
`yarnpkg add --dev --exact react-native-scripts` failed
@lucasbento
Copy link

What's your yarn version?

@aayanqazi
Copy link
Author

0.21.3

@elazzabi
Copy link

Not sure if this is the problem, but npm in Windows doesn't like spaces in paths.

@anp
Copy link
Contributor

anp commented Mar 14, 2017

@aayanqazi I don't see why spaces in the path would break things, but if you could try init'ing the project on a path without spaces that would help us narrow the issue down. Thanks!

@aayanqazi
Copy link
Author

The filename, directory name, or volume label syntax is incorrect.

@eloquentbit
Copy link

eloquentbit commented Mar 15, 2017

I have a similar problem:

❯ create-react-native-app my-app
Creating a new React Native app in /Users/luca/Developer/javascript/react-native/my-app.

Installing packages. This might take a couple minutes.
Installing react-native-scripts...

yarn add v0.19.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning react-native-scripts > xdl > [email protected]: use uuid module instead
warning react-native-scripts > xdl > @exponent/ngrok > [email protected]: use uuid module instead
warning react-native-scripts > xdl > auth0-js > xtend > [email protected]:
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
[1/5] ⠂ @exponent/ngrok
[2/5] ⠂ dtrace-provider
[3/5] ⠂ ref
[4/5] ⠂ runas
error /Users/luca/Developer/javascript/react-native/my-app/node_modules/ref: Command failed.
Exit code: 1
Command: sh
Arguments: -c node-gyp rebuild
Directory: /Users/luca/Developer/javascript/react-native/my-app/node_modules/ref
Output:
module.js:471
    throw err;
    ^
Error: Cannot find module '/Users/luca/n/lib/node_modules/yarn/node_modules/node-gyp/bin/node-gyp.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
yarnpkg add --dev --exact --ignore-optional react-native-scripts failed

OS: Mac OS X El Capitan 10.11.6
node version: 6.9.5
yarn version: 0.19.1
create-react-native-app: 0.0.5

@aayanqazi aayanqazi reopened this Mar 15, 2017
@aayanqazi
Copy link
Author

Now Facing That Issue

[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/5] ⠂ @exponent/ngrok: ngrok - downloading binary https://bin.equinox.io/c/6raCnPaTf2c/ngrok-beta-windows-amd64.zip ...
[-/5] ⠂ waiting...
[3/5] ⠂ ref: using [email protected] | win32 | x64
[4/5] ⠄ runas: [email protected] | win32 | x64
error F:\my-project\node_modules\ref: Command failed.
Exit code: 1
Command: C:\Windows\system32\cmd.exe
Arguments: /d /s /c node-gyp rebuild
Directory: F:\my-project\node_modules\ref
Output:
F:\my-project\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Users\Arsalan Sabir\AppData\Roaming\npm\node_modules\yarn\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\Arsalan Sabir\AppData\Local\Programs\Python\Python36-32", you can set the PYTHON env variable.
gyp ERR! stack at Object.failNoPython (C:\Users\Arsalan Sabir\AppData\Roaming\npm\node_modules\yarn\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack at Object. (C:\Users\Arsalan Sabir\AppData\Roaming\npm\node_modules\yarn\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack at C:\Users\Arsalan Sabir\AppData\Roaming\npm\node_modules\yarn\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "E:\node\node.exe" "C:\Users\Arsalan Sabir\AppData\Roaming\npm\node_modules\yarn\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd F:\my-project\node_modules\ref
gyp ERR! node -v v6.10.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
yarnpkg add --dev --exact --ignore-optional react-native-scripts failed

@koichirokamoto
Copy link

@aayanqazi
I had same problem. I had used python3.6 in system environment, too.
My workaround is that change version to python2.7.

@flexzuu
Copy link

flexzuu commented Mar 15, 2017

I got an equivalent error on Windows 10:

C:\Users\Jonas\Documents\GitHub>node -v
v7.7.3

C:\Users\Jonas\Documents\GitHub>npm -v
4.1.2

C:\Users\Jonas\Documents\GitHub>yarn --version
0.21.3

C:\Users\Jonas\Documents\GitHub>create-react-native-app --version
create-react-native-app version: 0.0.5

C:\Users\Jonas\Documents\GitHub>python --version
Python 2.7.13
C:\Users\Jonas\Documents\GitHub>create-react-native-app test-app
Creating a new React Native app in C:\Users\Jonas\Documents\GitHub\test-app.

Installing packages. This might take a couple minutes.
Installing react-native-scripts...

yarn add v0.21.3
info No lockfile found.
[1/4] Resolving packages...
warning react-native-scripts > xdl > [email protected]: use uuid module instead
warning react-native-scripts > xdl > @exponent/ngrok > [email protected]: use uuid module instead
warning react-native-scripts > xdl > auth0-js > xtend > [email protected]:
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[-/5] ⡀ waiting...
[-/5] ⡀ waiting...
[3/5] ⡀ ref: Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu
[4/5] ⡀ runas: Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung z
error C:\Users\Jonas\Documents\GitHub\test-app\node_modules\ref: Command failed.
Exit code: 1
Command: C:\Windows\system32\cmd.exe
Arguments: /d /s /c node-gyp rebuild
Directory: C:\Users\Jonas\Documents\GitHub\test-app\node_modules\ref
Output:
C:\Users\Jonas\Documents\GitHub\test-app\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files (x8
6)\Yarn\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\\Program Files (x86)\\Yarn\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=2015',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Jonas\\Documents\\GitHub\\test-app\\node_modules\\ref\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Program Files (x86)\\Yarn\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Jonas\\.node-gyp\\7.7.3\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Jonas\\.node-gyp\\7.7.3',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Program Files (x86)\\Yarn\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\Jonas\\Documents\\GitHub\\test-app\\node_modules\\ref',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\Jonas\\Documents\\GitHub\\test-app\\node_modules\\ref\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu erm�glichen, m�ssen Si
e den Schalter "/m" hinzuf�gen.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error
MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK versio
n in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\Jonas\Doc
uments\GitHub\test-app\node_modules\ref\build\binding.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\Yarn\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files (x86)\\Yarn\\node_modules\\node-gyp\\bin\\node
-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Jonas\Documents\GitHub\test-app\node_modules\ref
gyp ERR! node -v v7.7.3
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
`yarnpkg add --dev --exact --ignore-optional react-native-scripts` failed

@anp
Copy link
Contributor

anp commented Mar 16, 2017

@aayanqazi @flexzuu @eloquentbit There appears to be a problem with current versions of yarn when requesting to ignore optional dependencies -- these failures are happening because transitive optional deps are causing the installation to fail. It's not a bad idea to get the build dependencies set up (https://www.npmjs.com/package/windows-build-tools, python, etc.), it's also possible to resolve this by uninstalling yarn and allowing CRNA to use npm (which sucks) but I am hoping to find a workaround that doesn't have these issues..

@anp
Copy link
Contributor

anp commented Mar 16, 2017

A solution to this will be the same as a solution to #48, so I'm going to close this in favor of tracking the problem there.

@anp anp closed this as completed Mar 16, 2017
@aayanqazi
Copy link
Author

Thanks i have Solved that problem after uninstall yarn ....

npm uninstall -g yarn

@cakriwut
Copy link

cakriwut commented Jun 17, 2017

I have the same problem, and it resolved after I replaced npm v5.0.3 with npm 4.6.1

FYI, I stuck at following error while using npm v5.0.3

5725 verbose stack Error: sha1-N/5m+SKxAD2ip4xmt9TTvJMT5CM= integrity checksum failed when using sha1: wanted sha1-N/5m+SKxAD2ip4xmt9TTvJMT5CM= but got sha1-M3+sgWzhlBdoV99ndLCkoK9nd0M=. (32848502 bytes)
5725 verbose stack at Transform.on (C:\Users\cakri\AppData\Roaming\npm\node_modules\npm\node_modules\ssri\index.js:278:19)
5725 verbose stack at emitNone (events.js:110:20)
5725 verbose stack at Transform.emit (events.js:207:7)
5725 verbose stack at endReadableNT (_stream_readable.js:1047:12)
5725 verbose stack at _combinedTickCallback (internal/process/next_tick.js:102:11)
5725 verbose stack at process._tickCallback (internal/process/next_tick.js:161:9)
5726 verbose cwd D:\Source\React2
5727 verbose Windows_NT 10.0.15063
5728 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\cakri\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "--save-dev" "--save-exact" "react-native-scripts"
5729 verbose node v8.1.2
5730 verbose npm v5.0.3
5731 error code EINTEGRITY
5732 error sha1-N/5m+SKxAD2ip4xmt9TTvJMT5CM= integrity checksum failed when using sha1: wanted sha1-N/5m+SKxAD2ip4xmt9TTvJMT5CM= but got sha1-M3+sgWzhlBdoV99ndLCkoK9nd0M=. (32848502 bytes)
5733 verbose exit [ 1, true ]

@brentvatne
Copy link
Member

yup, please don't use npm 5 for now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants