After cloning the react boilerplate when I ran the npm run setup its show error.
PS D:\React\react-boilerplate> npm run setup
> react-boilerplate#4.0.0 presetup D:\React\react-boilerplate
> npm i chalk shelljs
> pngquant-bin#5.0.2 postinstall D:\React\react-boilerplate\node_modules\pngquant-bin
> node lib/install.js
‼ Command failed: D:\React\react-boilerplate\node_modules\pngquant-bin\vendor\pngquant.exe --version
‼ pngquant pre-build test failed
i compiling from source
× Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (D:\React\react-boilerplate\node_modules\execa\index.js:231:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
npm WARN connected-react-router#6.4.0 requires a peer of react-redux#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN jest-styled-components#6.3.1 requires a peer of styled-components#^2.0.0 || ^3.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin#5.0.2 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin#5.0.2 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\Coder\AppData\Roaming\npm-cache\_logs\2019-07-17T11_03_29_890Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-boilerplate#4.0.0 presetup: `npm i chalk shelljs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-boilerplate#4.0.0 presetup 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\Coder\AppData\Roaming\npm-cache\_logs\2019-07-17T11_03_30_260Z-debug.log
you must run npm i chalk shelljs, then npm run setup
Related
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-barcode#1.4.1
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! react#"^18.2.0" from the root project
npm ERR! peer react#">=16.8.4" from #ant-design/charts#1.4.2
npm ERR! node_modules/#ant-design/charts
npm ERR! #ant-design/charts#"^1.4.2" from the root project
npm ERR! 65 more (#ant-design/flowchart, #ant-design/graphs, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.0.0 || ^17.0.0" from react-barcode#1.4.1
npm ERR! node_modules/react-barcode
npm ERR! react-barcode#"^1.4.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#"^16.0.0 || ^17.0.0" from react-barcode#1.4.1
npm ERR! node_modules/react-barcode
npm ERR! react-barcode#"^1.4.1" 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!
npm ERR! For a full report see:
npm ERR! C:\Users\ghost\AppData\Local\npm-cache_logs\2023-01-24T07_50_41_550Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ghost\AppData\Local\npm-cache_logs\2023-01-24T07_50_41_550Z-debug-0.log
I tried npm install and this error is showing.
I also used npm start But it also showed error
npm WARN config global --global, --localare deprecated. Use--location=global` instead.
frontend#0.1.0 start
react-scripts start
'react-scripts' is not recognized as an internal or external command,
operable program or batch file.`
This is due to the version of react-scripts did not match your project.
Run npm install react-scripts --save
Your project should be running fine
I have recently updated my react project from React v16 to v18. It builds on my local machine using npm run build. But after deploying in Aws Amplify to build it gives error! Throwing whole log below. Is it something from npm error or While resolving: #material-ui/core#4.12.4 on the log showed so?
2022-12-14T10:37:14.709Z [INFO]: # Executing command: npm install
2022-12-14T10:37:19.882Z [WARNING]: npm ERR! code
2022-12-14T10:37:19.884Z [WARNING]: ERESOLVE
2022-12-14T10:37:19.904Z [WARNING]: npm
2022-12-14T10:37:19.904Z [WARNING]: ERR! ERESOLVE could not resolve
npm ERR!
npm ERR!
2022-12-14T10:37:19.904Z [WARNING]: While resolving: #material-ui/core#4.12.4
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! react#"^18.2.0" from the root project
2022-12-14T10:37:19.904Z [WARNING]: npm ERR! peerOptional react#"^16.8.0 || ^17.0.0 ||
^18.0.0" from #apollo/client#3.7.2
npm ERR! node_modules/#apollo/client
npm ERR! #apollo/client#"^3.3.14" from the root
project
npm ERR! #apollo/client#"latest" from #apollo/react-
components#4.0.0
npm ERR! node_modules/#apollo/react-components
npm ERR! #apollo/react-components#"^4.0.0-beta.2"
from the root project
npm ERR! 33 more (#aws-amplify/ui-react, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.0" from #material-
ui/core#4.12.4
2022-12-14T10:37:19.905Z [WARNING]: npm ERR! node_modules/#material-ui/core
npm ERR! #material-ui/core#"^4.11.3" from the root
project
npm ERR!
npm ERR! Conflicting peer dependency: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#"^16.8.0 || ^17.0.0" from
#material-ui/core#4.12.4
npm ERR! node_modules/#material-ui/core
npm ERR! #material-ui/core#"^4.11.3" 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
2022-12-14T10:37:19.905Z [WARNING]: ERR! to accept an incorrect (and potentially broken)
dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full
report.
2022-12-14T10:37:19.906Z [WARNING]:
2022-12-14T10:37:19.906Z [WARNING]: npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-12-14T10_37_14_924Z-
debug-0.log
2022-12-14T10:37:19.918Z [ERROR]: !!! Build failed
2022-12-14T10:37:19.918Z [ERROR]: !!! Non-Zero Exit Code detected
2022-12-14T10:37:19.918Z [INFO]: # Starting environment caching...
2022-12-14T10:37:19.918Z [INFO]: # Uploading environment cache artifact...
2022-12-14T10:37:20.001Z [INFO]: # Uploaded environment cache artifact
2022-12-14T10:37:20.001Z [INFO]: # Environment caching completed
Terminating logging...
Can anyone help me out? Thanks in advance.
If you use React 18, you should use it with #mui/material v5 instead of #material-ui/core.
https://mui.com/material-ui/getting-started/overview/
first, I was getting the same error for react-icons. now I am getting errors for the typewriter. it works fine on localhost. when I'm trying to npm i typewriter getting this error:
also tried CI false doesn't worked.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: cert#0.1.0
npm ERR! Found: react#18.1.0
npm ERR! node_modules/react
npm ERR! react#"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.x" from typewriter-effect#2.18.2
npm ERR! node_modules/typewriter-effect
npm ERR! typewriter-effect#"*" 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 /Users/Dave/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Dave/.npm/_logs/2022-05-12T15_25_57_631Z-debug-0.log
Cloning completed: 532.695ms
Installing build runtime...
Build runtime installed: 2.177s
Looking up build cache...
Build Cache not found
Installing dependencies...
npm WARN deprecated source-map-resolve#0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
added 1406 packages in 30s
172 packages are looking for funding
run `npm fund` for details
Detected `package-lock.json` generated by npm 7...
Running "npm run build"
> certauto#0.1.0 build
> react-scripts build
Creating an optimized production build...
Failed to compile.
Module not found: Error: Can't resolve 'typewriter-effect' in '/vercel/path0/src/components'
Error: Command "npm run build" exited with 1
it works for me,
go to vercel
Go to your project
settings
install command = npm install --force or npm install --legacy-peer-deps
I am trying to run gatsby develop in order to start the development server but I am getting the following error:
There was a problem loading the local develop command. Gatsby may not be installed in your site's "node_modules" directory. Perhaps you need to run "npm install"? You might need to delete your "package-lock.json" as well.
This is the project that I am working on: https://github.com/andreiprv/andyprv-blog
Cloned from this repo: https://github.com/alxshelepenok/gatsby-starter-lumen
It is probably a dependency issue, but I don't have the know-how to figure out how to solve it. After I started the project with gatsby new etc, I've got the following errors:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: gatsby-starter-lumen#3.0.7
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.4.2" from gatsby#2.28.0
npm ERR! node_modules/gatsby
npm ERR! gatsby#"^2.27.4" from the root project
npm ERR! peer gatsby#"*" from #sentry/gatsby#5.28.0
npm ERR! node_modules/#sentry/gatsby
npm ERR! #sentry/gatsby#"^5.27.6" 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 /Users/andreismbp/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/andreismbp/.npm/_logs/2020-12-04T17_22_00_512Z-debug.log
error Command failed with exit code 1: npm install
Error: Command failed with exit code 1: npm install
- error.js:56 makeError
[lib]/[gatsby-cli]/[execa]/lib/error.js:56:11
- index.js:114 handlePromise
[lib]/[gatsby-cli]/[execa]/index.js:114:26
- task_queues:93 processTicksAndRejections
node:internal/process/task_queues:93:5
- init-starter.js:135 install
[lib]/[gatsby-cli]/lib/init-starter.js:135:7
- init-starter.js:202 clone
[lib]/[gatsby-cli]/lib/init-starter.js:202:3
- init-starter.js:343 initStarter
[lib]/[gatsby-cli]/lib/init-starter.js:343:5
- create-cli.js:449
[lib]/[gatsby-cli]/lib/create-cli.js:449:9
I tried to uninstall and install gatsby again using npm uninstall --save gatsby && npm install --save gatsby
but it failed with the following errors
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: gatsby-starter-lumen#3.0.7
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.4.2" from gatsby#2.28.0
npm ERR! node_modules/gatsby
npm ERR! peer gatsby#"*" from #sentry/gatsby#5.28.0
npm ERR! node_modules/#sentry/gatsby
npm ERR! #sentry/gatsby#"^5.27.6" 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 /Users/andreismbp/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/andreismbp/.npm/_logs/2020-12-04T17_51_08_843Z-debug.log
Thank you in advance!
Did the following, ran npm install --legacy-peer-deps
Then hit another error when running gatsby develop :
Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (88)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
error undefined failed
Fixed the above by downgrading node to v14.15.1. After that I needed to run npm rebuild node-sass
I've resolved this issue by running yarn install instead of npm install
Not sure if this may be related, I had a similar issue, but mine was caused by a mismatch dependency between my node version and the version some library was using, so after changing to another version it worked for me.
I noticed that there was an error by running npm install --loglevel verbose
see if you can get additional information.
I have tried multiple times to install angular-cli in my ubuntu 16.04, but everytime I got failed. I am using node version 6.9.1 and npm version 3.10.8. I'm enclosing the errors here in this post.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/angular-cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN #angular/compiler-cli#0.6.4 requires a peer of #angular/compiler#2.0.2 but none was installed.
npm WARN #angular/compiler-cli#0.6.4 requires a peer of #angular/platform-server#2.0.2 but none was installed.
npm WARN #angular/compiler-cli#0.6.4 requires a peer of #angular/core#2.0.2 but none was installed.
npm ERR! Linux 4.4.0-42-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli#latest"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! path /usr/local/lib/node_modules/.staging/abbrev-e9ea1451
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/.staging/abbrev-e9ea1451' -> '/usr/local/lib/node_modules/angular-cli/node_modules/npm/node_modules/abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-e9ea1451' -> '/usr/local/lib/node_modules/angular-cli/node_modules/npm/node_modules/abbrev'
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! /home/pc/Downloads/node-v6.9.1/npm-debug.log
npm ERR! code 1
Does anyone have a fix?
https://github.com/angular/angular-cli/issues/1190
Try running
sudo npm uninstall -g angular-cli
sudo npm install-g angular-cli