Closed
Description
Description
Not able to create project with Yarn and NPM. Yarn causes gyp errors. NPM causes package starting errors.
Expected Behavior
What action did you perform, and what did you expect to happen?
With npm project (Yarn uninstalled) -> create-react-native-app testcrna
With yarn project -> create-react-native-app testcrnayarn
Observed Behavior
With NPM
Sandeep testcrna $ npm start
> testcrna@0.1.0 start C:\Users\Sandeep\Desktop\Programming\react-native\testcrna
> react-native-scripts start
15:08:22: Starting packager...
15:08:23: Error starting packager: Error: Couldn't start project. Please fix the errors and restart the project.
at C:\xdl\src\Project.js:1039:11
at Generator.next (<anonymous>)
at step (C:\Users\Sandeep\Desktop\Programming\react-native\testcrna\node_modules\xdl\build\Project.js:1461:191)
at C:\Users\Sandeep\Desktop\Programming\react-native\testcrna\node_modules\xdl\build\Project.js:1461:361
at <anonymous>
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! testcrna@0.1.0 start: `react-native-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the testcrna@0.1.0 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! C:\Users\Sandeep\AppData\Roaming\npm-cache\_logs\2017-06-06T20_08_24_176Z-debug.log
With Yarn
yarn install v0.24.6
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⡀ sqlite3: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolset
[-/1] ⡀ waiting...
[-/1] ⡀ waiting...
[-/1] ⡀ waiting...
error C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3: Command failed.
Exit code: 1
Command: C:\WINDOWS\system32\cmd.exe
Arguments: /d /s /c node-pre-gyp install --fallback-to-build
Directory: C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.6.31
node-pre-gyp info using node@8.0.0 | win32 | x64
node-pre-gyp info check checked for "C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node" (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v57-win32-x64.tar.gz
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v57-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.8 and node@8.0.0 (node-v57 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http Unexpected token }
[SANDEEP]>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean )
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@8.0.0 | win32 | x64
gyp info ok
[SANDEEP]>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64 ) else (node "" configure --fallback-to-build --module=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64 )
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@8.0.0 | win32 | x64
gyp info spawn C:\Users\Sandeep\.windows-build-tools\python27\python.exe
gyp info spawn args [ 'C:\\Program Files\\nodejs\\node_modules\\npm\\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\\Sandeep\\Desktop\\Programming\\react-native\\testcrnayarn\\node_modules\\sqlite3\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Sandeep\\.node-gyp\\8.0.0\\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\\Sandeep\\.node-gyp\\8.0.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\Sandeep\\Desktop\\Programming\\react-native\\testcrnayarn\\node_modules\\sqlite3',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\Sandeep\\Desktop\\Programming\\react-native\\testcrnayarn\\node_modules\\sqlite3\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok
[SANDEEP]>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build --module=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64 ) else (node "" build --fallback-to-build --module=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64 )
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@8.0.0 | win32 | x64
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.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' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 10.0.14393.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:285:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\Sandeep\\Desktop\\Programming\\react-native\\testcrnayarn\\node_modules\\sqlite3\\lib\\binding\\node-v57-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\Sandeep\\Desktop\\Programming\\react-native\\testcrnayarn\\node_modules\\sqlite3\\lib\\binding\\node-v57-win32-x64"
gyp ERR! cwd C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Windows_NT 10.0.15063
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Sandeep\\Desktop\\Programming\\react-native\\testcrnayarn\\node_modules\\sqlite3\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn\node_modules\sqlite3\lib\binding\node-v57-win32-x64' (1)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Environment
In NPM created project
Sandeep testcrna $ npm ls react-native-scripts
testcrna@0.1.0 C:\Users\Sandeep\Desktop\Programming\react-native\testcrna
`-- react-native-scripts@0.0.30
Sandeep testcrna $ npm ls react-native
testcrna@0.1.0 C:\Users\Sandeep\Desktop\Programming\react-native\testcrna
`-- UNMET DEPENDENCY react-native@^0.44.0
npm ERR! missing: react-native@^0.44.0, required by testcrna@0.1.0
Sandeep testcrna $ npm ls expo
testcrna@0.1.0 C:\Users\Sandeep\Desktop\Programming\react-native\testcrna
`-- UNMET DEPENDENCY expo@^17.0.0
npm ERR! missing: expo@^17.0.0, required by testcrna@0.1.0
Sandeep testcrna $ node -v
v8.0.0
Sandeep testcrna $ npm -v
5.0.2
Sandeep testcrna $ watchman version
bash: watchman: command not found
Sandeep testcrna $
In Yarn created project
Sandeep testcrnayarn $ npm ls react-native-scripts
testcrnayarn@0.1.0 C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn
`-- react-native-scripts@0.0.30
Sandeep testcrnayarn $ npm ls react-native
testcrnayarn@0.1.0 C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn
`-- react-native@0.44.3
Sandeep testcrnayarn $ npm ls expo
testcrnayarn@0.1.0 C:\Users\Sandeep\Desktop\Programming\react-native\testcrnayarn
`-- expo@17.0.0
Sandeep testcrnayarn $ node -v
v8.0.0
Sandeep testcrnayarn $ npm -v
5.0.2
Sandeep testcrnayarn $ yarn --version
0.24.6
Sandeep testcrnayarn $ watchman version
bash: watchman: command not found
Also specify:
- Operating system: Windows 10
- Phone/emulator/simulator & version:
Note: Windows build tools (https://www.npmjs.com/package/windows-build-tools) also installed
Metadata
Metadata
Assignees
Labels
No labels