I can't install cordova in my Linux (deepin 15.5), please help me :)
$ sudo npm install -g ionic
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules/ionic/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
\+ ionic#3.19.0
updated 1 package in 8.52s
$sudo npm install -g cordova
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm ERR! path /usr/local/lib/node_modules/cordova/node_modules /npm/node_modules/ansistyles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/ansistyles' -> '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/.ansistyles.DELETE'
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! /root/.npm/_logs/2017-12-08T19_53_31_209Z-debug.log
You could try downgrading your NPM version. Personally, I had some issues with 5.6.0 and had to downgrade to 5.3.0, haven't had a problem with any packages since then.
If you want to, this is how you'd downgrade your version to 5.3.0:
npm install -g npm#5.3.0
Cheers!
EDIT: Also, make sure there have not been any previous installations of the package you are trying to install. Leftovers or older versions may cause conflict which might not let you install/update to newer versions.
Try this, if the previous solution doesn't work:
npm uninstall -g cordova
npm install -g cordova
Struggled for hours trying to uninstall and reinstall npm/node, with different versions and so on, but what finally did the work (without downgrading from 5.6.0) was as #Sairo Guanipa mentiond:
npm uninstall -g cordova
npm install -g cordova
From here on all worked fined (cordova/windows for me)
Related
I'm following the setup instructions from the React Native Documentation page, on my M1 Macbook Pro. I have previously worked on React projects and was able to create and run React Native Expo projects previously on the same machine.
I followed the instructions to the letter, but when I arrived at the 'Create A New Application" section, using the npx react-native init AwesomeProject command, the new project creation failed. Here are the error message outputted on the Terminal:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: react-native#0.66.4
npm ERR! node_modules/react-native
npm ERR! peer react-native#"*" from #react-native-community/cli#6.3.1
npm ERR! node_modules/#react-native-community/cli
npm ERR! #react-native-community/cli#"^6.0.0" from react-native#0.66.4
npm ERR! react-native#"0.69.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! react-native#"0.69.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#18.0.0
npm ERR! node_modules/react
npm ERR! peer react#"18.0.0" from react-native#0.69.2
npm ERR! node_modules/react-native
npm ERR! react-native#"0.69.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
I tried to uninstall react-native and install it back but couldn't find a proper instruction on the net to do that. How can I just scrape the previously installed react-native (judging from the error message, i got RN#0.66.4, when I want to use the latest RN) and install a fresh, latest react native?
if you are on Mac and your node version is 18.. which Is latest but not greatest.. you need to download 16.. the stable one.
Step-1
brew uninstall node;
# or `brew uninstall --force node` which removes all versions
brew cleanup;
rm -f /usr/local/bin/npm /usr/local/lib/dtrace/node.d;
rm -rf ~/.npm;
Step 2 - and install it from node site by downloading the binary
Step 3 - just check the node version again if you have 16..
then you can try creating the react native project once again.
Please let us know if it worked for you. Wish you luck!!
In addition to what the answer suggests, you can do brew install node#16 to install this particular version instead of manually downloading the binary.
If installing node version 16 doesn't work for you ensure you update npm by running sudo npm update -g.
I am currently using Node v14.16.0 and NPM v7.7.5 to install opensea-js as a dependency in a project.
I try to run the command npm install --save opensea-js, but I always end up with an error. I tried to clean NPM's cache, I have even reinstalled Node. I am on Windows. The stack trace is the following:
PS C:\multi-sender-opensea-js> npm install opensea-js
npm WARN deprecated safe-event-emitter#1.0.1: Renamed to #metamask/safe-event-emitter
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
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 chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated bignumber.js#6.0.0: Custom ALPHABET bug fixed in v7.0.2
npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
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 core-js#2.6.12: 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#2.6.12: 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 ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\aguay\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\aguay\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN deprecated safe-event-emitter#1.0.1: Renamed to #metamask/safe-event-emitter
npm ERR! npm WARN deprecated har-validator#5.1.3: this library is no longer supported
npm ERR! npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated debug#3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment.
It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! npm WARN deprecated chokidar#2.1.6: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm ERR! npm WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated bignumber.js#6.0.0: Custom ALPHABET bug fixed in v7.0.2
npm ERR! npm WARN deprecated buffer#4.9.1: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm ERR! npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410npm ERR! npm WARN tarball tarball data for ethereumjs-abi#git+ssh://git#github.com/ProjectWyvern/ethereumjs-abi.git (sha512-yLrVA0M7LdolTGm4Eeh+SOffugSViZY9z/j5ctseZn5jTBJ5DAbyZ3vu1lQzHhbTSI2KpzEbKnfkT8LeNZSgog==) seems to be corrupted. Trying again.
npm ERR! npm WARN tarball tarball data for ethereumjs-abi#git+ssh://git#github.com/ethereumjs/ethereumjs-abi.git (sha512-u07PCyvWSxvmLPqnK7XBY4Ia7j6aTf5BmKy2dbT297VMIXLjOaZJfu4SMcoPF2GSCINCRlVwIOqaLuSJ5UZANA==) seems to be corrupted. Trying again.
npm ERR! npm WARN tarball tarball data for ethereumjs-abi#git+ssh://git#github.com/ProjectWyvern/ethereumjs-abi.git (sha512-yLrVA0M7LdolTGm4Eeh+SOffugSViZY9z/j5ctseZn5jTBJ5DAbyZ3vu1lQzHhbTSI2KpzEbKnfkT8LeNZSgog==) seems to be corrupted. Trying again.
npm ERR! npm WARN tarball tarball data for ethereumjs-abi#git+ssh://git#github.com/ethereumjs/ethereumjs-abi.git (sha512-u07PCyvWSxvmLPqnK7XBY4Ia7j6aTf5BmKy2dbT297VMIXLjOaZJfu4SMcoPF2GSCINCRlVwIOqaLuSJ5UZANA==) seems to be corrupted. Trying again.
npm ERR! npm WARN tarball tarball data for bignumber.js#git+ssh://git#github.com/frozeman/bignumber.js-nolookahead.git (sha512-BPWfW6xhAeth4aWLg1g++Nrkn5KN+iqMsKQAdr/IywRCyBSjQ9JnyL49/Z3wgj2O/uW47RlYI2XPbJTKSoaVkw==) seems to be corrupted. Trying again.
npm ERR! npm WARN tarball tarball data for bignumber.js#git+ssh://git#github.com/frozeman/bignumber.js-nolookahead.git (sha512-BPWfW6xhAeth4aWLg1g++Nrkn5KN+iqMsKQAdr/IywRCyBSjQ9JnyL49/Z3wgj2O/uW47RlYI2XPbJTKSoaVkw==) seems to be corrupted. Trying again.
npm ERR! npm WARN deprecated core-js#2.6.9: 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 ERR! npm ERR! code EINTEGRITY
npm ERR! npm ERR! sha512-u07PCyvWSxvmLPqnK7XBY4Ia7j6aTf5BmKy2dbT297VMIXLjOaZJfu4SMcoPF2GSCINCRlVwIOqaLuSJ5UZANA== integrity checksum failed when using sha512:
wanted sha512-u07PCyvWSxvmLPqnK7XBY4Ia7j6aTf5BmKy2dbT297VMIXLjOaZJfu4SMcoPF2GSCINCRlVwIOqaLuSJ5UZANA== but got sha512-IA4lM/EAhHCmgR0uepm5PJ4b5/zcONaHZbBVlPbSbPT2+Mqbhj01vl11bupQPovWF6gHA3cDNkanFuaD3LTh5Q==. (13945 bytes)
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\aguay\AppData\Local\npm-cache\_logs\2021-03-26T20_11_41_637Z-debug.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aguay\AppData\Local\npm-cache\_logs\2021-03-26T20_11_45_803Z-debug.log
Does someone have an idea how I can solve this? Thank you in advance!
Try switching to Node.js version 8.11 to make sure common crypto dependencies work.
Execute nvm use, if you have Node Version Manager.
Try installing web3
from the opensea-js npm page
C:\Program Files\nodejs>npm install -g bower
npm WARN deprecated bower#1.8.8: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
C:\Users\Deepanshi\AppData\Roaming\npm\bower -> C:\Users\Deepanshi\AppData\Roaming\npm\node_modules\bower\bin\bower
bower#1.8.8
added 1 package from 1 contributor in 14.243s
C:\Program Files\nodejs>npm install -g polymer-cli#next
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\polymer-cli\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":"ia32"})
npm ERR! code EEXIST
npm ERR! path C:\Users\Deepanshi\AppData\Roaming\npm\node_modules\polymer-cli\bin\polymer.js
npm ERR! dest C:\Users\Deepanshi\AppData\Roaming\npm\polymer
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\Deepanshi\AppData\Roaming\npm\node_modules\polymer-cli\bin\polymer.js' -> 'C:\Users\Deepanshi\AppData\Roaming\npm\polymer'
npm ERR! File exists: C:\Users\Deepanshi\AppData\Roaming\npm\polymer
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Deepanshi\AppData\Roaming\npm-cache_logs\2020-10-07T12_56_44_680Z-debug.log
Try this :
npm i -g --force npm (note the --force flag)
If your output is get running npm install -g npm:
You can fix it with "brew reinstall node"
So :
brew reinstall node
npm i -g --force npm
I have installed webpack now I am trying to install webpack-cli but following errors occur:
$ npm i --save-dev webpack-cli
> webpack-cli#3.2.1 postinstall D:\Development\Practices\sample\starter\node_modules\webpack-cli
> lightercollective
'lightercollective' is not recognized as an internal or external command,
operable program or batch file.
npm WARN starter#1.0.0 No description
npm WARN starter#1.0.0 No repository field.
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"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-cli#3.2.1 postinstall: `lightercollective`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack-cli#3.2.1 postinstall 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\rajan\AppData\Roaming\npm-cache\_logs\2019-01-08T08_45_44_898Z-debug.log
Notes:
I have tried restarting my command line.
I have also tried npm cache clean --force
And googling about an hour.
Finally, what does that lightercollective is not recognized as.. in the above message means? Confused???
Install:
npm i -g lightercollective
They change stuff... you must specify version numbers when you get packages or it won't work in the future if there is some sort of a breaking change.
You can add lightercollective to your dependencies to solve the issue.
Official package page
"lightercollective": "^0.0.0"
Update webpack-cli: npm update webpack-cli --save-dev
In my situation, I went from 3.2.1 (which warned about "lightercollective") to 3.3.8. Seemed like the issue was resolved.
I'm using Ubuntu 15.04. While running the following command:
npm install fsevents
I'm getting following error:
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.11
npm WARN tutorial#1.0.0 No repository field.
Has anybody solved this?
I was facing the same issue with this dependecy when building other application.
Just for the sake of knowledge and to people who are not well used to NPM, and thus uncertain about how their applications will behave:
Since fsevents is an API in OS X allows applications to register for notifications of changes to a given directory tree. Running:
npm install --no-optional
Will do the trick, with no drawbacks.
It's not an error, it's just a warning: it's an optional dependency.
You can tell npm not to install optional dependencies by default using the command line below:
npm config set optional false
If you're getting ERR! not WARN a likely cause of this issue is that you're using a really outdated version of NPM
For me, I shelled into some server, and was like "why won't this work?", getting this error:
npm ERR! Linux 4.4.0-130-generic
npm ERR! argv "/home/william/.nvm/versions/node/v4.4.3/bin/node" "/home/william/.nvm/versions/node/v4.4.3/bin/npm" "install"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents#1.1.3
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64
npm ERR! Please include the following file with any support request:
npm ERR! /home/william/app/mcard-api/npm-debug.log
Turns out this server (that I only recently acquired) was running npm 2.15.1. I re-installed nvm, and nvm install --lts fixed it.
I had same issue with dependency. Kindly check for the package.json file , add "typings":"^0.8.1" entry under devDependency section. dont forget to add comma before :) Hope it will resolve issue.
I was also facing this error when installing Redux:
$ npm install --save react-redux
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
What solved the issue was to add --no-optional (argument will prevent optional dependencies from being installed):
npm install --no-optional --save react-redux
^^^^^^^^^^^^^
And now it is correctly installed:
$ npm ls redux
ReduxProject# /home/me/projects/reduxproject
└── redux#3.5.2
I found if you use "yarn add ." Yarn will exclude the fsevents will not throw an error.