React native create new app issue - npm exited with non-zero code: 1 - react-native

expo init test111
? Choose a template: expo-template-tabs
Using npm to install packages. You can pass --yarn to use Yarn instead.
Extracting project files...
Customizing project...
Unable to initialize git repo. git not in PATH.
Installing dependencies...
npm install
npm WARN deprecated deep-assign#3.0.0: Check out lodash.merge or merge-options instead.
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated core-js#1.2.7: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/naver/hammer.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mkame\AppData\Roaming\npm-cache_logs\2020-02-16T22_14_16_693Z-debug.log
npm exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.

rm -rf node_modules/
npm install
Try removing node modules and reinstall it. This worked for me.

Related

GoCD - npm install failing

I am trying to set up a pipeline using GoCD. I have a requirement of running npm install and npm test, and so, I created a Pipeline with a single Stage, that has a single Job with two tasks.
When I execute the pipeline, the npm install task seems to fail with the error mentioned below. However, when I manually run npm install from the repository in the agent's folder, it goes through without errors. With GoCD's npm install, I found that almost all packages except 2 seem to be installed. It fails with the follow error, and I suspect this to be some problem with node-gyp.
...
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules/glob-watcher/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 install: `node install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn sh ENOENT
npm ERR! file sh
npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! node-expat#2.4.0 install: `node-gyp rebuild`
npm ERR! spawn sh ENOENT
npm ERR!
npm ERR! Failed at the node-expat#2.4.0 install 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:
...
I tried using Jenkins and found the same issue. After a lot of deep dives, I found that it had something to do with the Python version being used, which in turn is due to the Node version being used. I was using Node v12.4.0, and upgrading it to Node v14.x.x addressed my issue.

npm install -g #vue/cli get error VUE CLI INSTALL ERROR npm star and vue serve

npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/daniel/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/daniel/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/daniel/.npm/_logs/2022-11-11T00_09_58_091Z-debug-0.log
npm install -g #vue/cli
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated subscriptions-transport-ws#0.11.0: The subscriptions-transport-ws package is no longer maintained. We recommend you use graphql-ws instead. For help migrating Apollo software to graphql-ws, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using graphql-ws, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
changed 847 packages, and audited 848 packages in 40s
64 packages are looking for funding
run npm fund for details
4 vulnerabilities (2 moderate, 2 high)
To address all issues (including breaking changes), run:
npm audit fix --force
Run npm audit for details.
Trying to install vue/cli and trying to run vue will do, but the errors described

I am getting this error while installing npm

F:\Hcheckup2.0>npm install
npm WARN deprecated core-js#2.5.1: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated ckeditor#4.7.3: We have renamed the #ckeditor package. New versions are available under the #ckeditor4 name.
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated opn#6.0.0: The package has been renamed to open
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated json3#3.3.2: Please use the native JSON object instead of JSON 3
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/angular/web-animations-js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\SONY\AppData\Roaming\npm-cache_logs\2020-01-07T04_33_32_195Z-debug.log
update your core-js with this command
npm install --save core-js#^3
also read https://reactjs.org/blog/2017/09/25/react-v15.6.2.html this you will get better things.
The error is related to web-animations.js. Can you try removing and adding the package.json reference for this library. Also more information about your package contents will be helpful.

react-native-reanimated#1.0.0-alpha.10 requires a peer of react#16.0.0-alpha.6

I want to create an app available on Android and iOS. I have a background using Android Studio but I am new with cross-platform development.
I just install node.js v10.15.0npm.
I also installed Atom and Nuclide.
I put install -g create-react-native-app in my terminal and I create my first app Dimitest : create-react-native-app Dimitest.
I choosed expo-template-blank for my template.
But then several warnings appear and I really do not know how to fix them.
Can someone help me ?
npm WARN react-native-reanimated#1.0.0-alpha.10 requires a peer of react#16.0.0-alpha.6 but none is installed. You must install peer
dependencies yourself.
npm WARN react-native-reanimated#1.0.0-alpha.10 requires a peer of react-native#^0.44.1 but none is installed. You must install peer
dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
Then I tried npm start and this then appeared:
npm ERR! path C:\Users\melis\Documents\Projet_react_dimi\package.json
npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm
ERR! enoent ENOENT: no such file or directory, open
'C:\Users\melis\Documents\Projet_react_dimi\package.json' npm ERR!
enoent This is related to npm not being able to find a file. npm ERR!
enoent
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\melis\AppData\Roaming\npm-cache_logs\2018-12-28T16_35_44_491Z-debug.log

PolymerCLI - Error : Run the command "npm install -g polymer-cli-1.5.7.tgz"

Following the steps:
install polymer-cli
Run the command : npm install polymer-cli
After install the bundled-debs :
Run the command : npm install -g bundle-deps
After run the command :
bundle-deps
Finally run the command :
npm pack
Got the polymer-cli-1.5.7.tgz file.
Now, run the npm install command,
npm install -g polymer-cli-1.5.7.tgz
Result :
Get the error message :
```
C:\Users\*****\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\polymer-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm WARN sinon-chai#2.14.0 requires a peer of chai#>=1.9.2 <5 but none was installed.
npm WARN sinon-chai#2.14.0 requires a peer of sinon#^1.4.0 || ^2.1.0 || ^3.0.0 || ^4.0.0 but none was installed.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "polymer-cli-1.5.7.tgz"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! path C:\Users\*****\AppData\Roaming\npm\node_modules\.staging\#polymer\sinonjs-1e1235f0
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\*****\AppData\Roaming\npm\node_modules\.staging\#polymer\sinonjs-1e1235f0' -> 'C:\Users\*****\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\#polymer\sinonjs'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\*****\AppData\Roaming\npm\node_modules\.staging\#polymer\sinonjs-1e1235f0' -> 'C:\Users\*****\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\#polymer\sinonjs'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\nginx-1.13.7\html\polymer-cli\npm-debug.log
npm ERR! code 1
```
Note:
****** - User Name
Versions & Environment
- Polymer CLI: 1.5.7
- node: v.6.11.5
- Operating System: windows
I am not sure why are you installing polymer-cli-1.5.7.tgz when you installed polymer-cli already in the first step? But not globally, you are missing -g switch in first step. What are you trying to achieve, which procedure do you follow? The issue could be related to permissions because you don't have rights to access that path, but you could try running console with administrator privileges. It is better to explain what exactly you want to setup so we can give you a better answer :)