It Shows multiple erros while installing npm in my smartcontracts
I've tried npm install --save core-js#^3 --legacy-peer-deps too
Related
when I try to run "npm install" I get errors that I have brought parts of them here:
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/local/lib/node_modules/node/bin/node
/usr/local/lib/node_modules/npm/bin/npm-cli.js install --force --
cache=/Users/afshinshahpari/.npm --prefer-offline=false --prefer-online=false --
offline=false --no-progress --no-save --no-audit --include=dev --include=peer --
include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN old lockfile
npm ERR! npm WARN old lockfile The package-lock.json file was created with an old
version of npm,
npm ERR! npm WARN old lockfile so supplemental metadata must be fetched from the
registry.
npm ERR! npm WARN old lockfile
npm ERR! npm WARN old lockfile This is a one-time fix-up, please be patient...
npm ERR! npm WARN old lockfile
npm ERR! npm WARN deprecated fsevents#1.2.11: fsevents 1 will break on node v14+ and
could be using insecure binaries. Upgrade to fsevents 2.
after reading few articles , I used many commands like this:
npm cache clean --force
or
npm i --package-lock-only
But none of them fixed the issue, even some of them like "npm audit fix --force" showed other types of errors.
Any advice would be appreciated.
What version of node and npm are you using?
I had the same error, spent hours Googling and trying the same things...
npm cache clean --force
rm -rf node_modules
rm -rf package-lock.json
The error remained...
I ended up downgrading my version of npm to 6.14.15. I was using the latest version of npm which I believe is 7.something. I downgraded to 6.14.15 because that's the one that comes in the stable node.js download.
I don't have the details on why it worked or what's different in the versions but running npm i worked for me after downgrading.
I had same issue
try this, it will solve the issue
npm cache clean --force
rm -rf node_modules
rm -rf package-lock.json
npm install -g npm#6.14.15
npm i
I tried to install #material-ui/core librabry but then npm throws the error below
I used the
npm install #material-ui
command
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: school-demo#0.1.0
npm ERR! Found: react#17.0.1
npm ERR! node_modules/react
npm ERR! react#"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0" from #material-ui/core#4.11.0
npm ERR! node_modules/#material-ui/core
npm ERR! #material-ui/core#"*" 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.
npm ERR!
npm ERR! See /home/freduah/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/freduah/.npm/_logs/2020-11-02T14_50_03_045Z-debug.log
freduah#freduah:~/school-demo$ ```
MaterialUI 4 doesn't support React 17 yet. Please check the issue created on github https://github.com/mui-org/material-ui/issues/23306.
You can try to install it by force by adding '-f':
npm install -f #material-ui/core
I had come across the same problem. These worked for me:
For core: npm -f install #material-ui/core
For icons: npm -f install #material-ui/icons
you can downgrade your react, it worked for me by this command:(I downgrade from v17)
npm install --save react#16.13.0 react-dom#16.13.0
Material UI is using emotion as a styling engine by default. If you want to use styled-components instead, run:
try to use this
npm install #mui/material #mui/styled-engine-sc styled-components
i highly recommend to read the document in thar website and not from npm
npm install #mui/material #emotion/react #emotion/styled
worked for me. Which I found on https://mui.com/
check your react versian, MaterialUI 4 doesn't support React 17. you can change youre version by
npm install --save react#16.13.0 react-dom#16.13.0
make sure Assuming you're using npm/yarn or another node package manager, dependency versions are listed in package.json.
Search for the react and react-dom packages under dependencies (or devDependencies) and replace their versions with 16.13.0. Then run npm install or yarn or whatever package manager you're using. This should be enough to downgrade to React 16.
Try
yarn add #material-ui/core & yarn add #material-ui/core
React 17 dont support material UI install previous versions or use yarn It will take some time but work perfectly fine
This worked for me
npm install -force #material-ui/core
Problem: npm install #material-ui/core
Solution:
npm install #mui/material #emotion/react #emotion/styled
OR
yarn add #mui/material #emotion/react #emotion/styled
npm install -f #material-ui/core
or
npm install #mui/material #emotion/react #emotion/styled --legacy-peer-deps
or You can downgrade react
npm install --save react#16.13.0 react-dom#16.13.0
Mac Catalina 10.15.6
I already had npm installed. I wanted to upgrade so I ran the following.
npm install -g npm
Below is the output:
$name#$names-MacBook-Pro desktop % npm install -g npm
/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm ERR! code EEXIST npm ERR! syscall symlink npm ERR! path
../../../lib/node_modules/npm/man/man1/npm-bin.1 npm ERR! dest
/usr/local/share/man/man1/npm-bin.1 npm ERR! errno -17 npm ERR!
EEXIST: file already exists, symlink
'../../../lib/node_modules/npm/man/man1/npm-bin.1' ->
'/usr/local/share/man/man1/npm-bin.1' npm ERR! File exists:
/usr/local/share/man/man1/npm-bin.1 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!
/Users/$name/.npm/_logs/2020-10-04T14_41_02_611Z-debug.log
Now all NPM commands fail.
zsh: command not found: npm
Everything from:
npm -v
sudo npm install npm -g
I just used home brew to upgrade NPM and it deleted and reinstalled all the necessary files.
This generally works for me on Mac:
brew upgrade
brew cleanup
brew install npm
(note you'll need the xcode tools if you don't have it - try xcode-select --install or check out this answer.)
Now, try npm install again and see if that changes anything.
Also, see this potentially related answer.
I am aware that there are already questions about this but they didn't work and most of them are for create-react-native-app but I am using expo.
I run npm install react-navigation and it gives me this error:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: file-uri-to-path#1.0.0 (node_modules\file-uri-to-path):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\yaelp\Downloads\meals-cat\node_modules\file-uri-to-path' -> 'C:\Users\yaelp\Downloads\meals-cat\node_modules\.file-uri-to-path.DELETE'
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Users\yaelp\Downloads\meals-cat\node_modules\hoist-non-react-statics
npm ERR! dest C:\Users\yaelp\Downloads\meals-cat\node_modules\.hoist-non-react-statics.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\yaelp\Downloads\meals-cat\node_modules\hoist-non-react-statics' -> 'C:\Users\yaelp\Downloads\meals-cat\node_modules\.hoist-non-react-statics.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! C:\Users\yaelp\AppData\Roaming\npm-cache\_logs\2020-10-01T17_02_25_868Z-debug.log
Try to install all dependencies (from the documentation of react-navigation).
Run:
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context #react-native-community/masked-view
I hope you resolved your issue by now (more than a month has passed since you posted the question). For those who might get it (like I did), here are some possible solutions:
Install react-navigation with yarn:
In the official react-navigation docs there is a yarn install command:
yarn add react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context #react-native-community/masked-view
Try deleting package-lock.json file and then try installing react-navigation with npm again
Killing your app and then trying to install react-navigation,
Deleting your node_modules and do npm i again,
Try uninstalling node, npm and everything with it (and reinstalled everything afterwards of course).
I got these solutions from this github issue. I hope one of them will help.
Try to use expo install react-navigation as you are using expo.
If you need to use npm, try:
npm install react-navigation --force
Try to run npm install, then npm install #react-navigation/native from reactnavigation
Tried installing vue js through
npm install -g #vue/cli.
My npm version is 6.14.4 and node version is 12.16.2
This is the error i am getting
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! Unexpected end of JSON input while parsing near '...nEaUD\r\n=F4TR\r\n---'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Sudesh\AppData\Roaming\npm-cache\_logs\2020-04-16T01_32_53_989Z-debug.log
I tried looking into the repo. I didn't understand what is the solution for this problem.
Try npm cache clean --force and then run the npm install -g #vue/cli . I think this must solve your issue.
Try npm cache clean --force and then run the npm install -g #vue/cli I think this must solve your issue.
Basically, use the npm cache clean --force command in our terminal to delete all data from your cache folder after that run npm install -g #vue/cli. then run vue create myapp to create your vue CLI app
Step : 1 npm cache clean --force
Step : 2 npm install -g #vue/cli
clean npm cache: npm cache clean --force
if you are using mac or Linux try with sudo npm install -g #vue/cli
for windows npm install -g #vue/cli