I needed some help in getting my first open source project that I want to work on to run on my machine. I have a 2018 MacBook Pro 15” running Big Sur 11.1 (20C69). I am using VS Code as my IDE. I have forked and cloned the repository for my project.
I have followed the instructions on how to get the app to run here:
https://github.com/bancodobrasil/stop-analyzing-embed
Here are the instructions on how to contribute:
https://github.com/bancodobrasil/stop-analyzing-embed/blob/master/CONTRIBUTING.md
This is the issue I have been assigned, and I am going to work on:
https://github.com/bancodobrasil/stop-analyzing-embed/issues/72
I have first run “npm install” and then “npm run dev”.
Here are the errors I get in terminal:
The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.
ShoaibKhansMBP:stop-analyzing-embed shoaibkhan$ cd app
ShoaibKhansMBP:app shoaibkhan$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: stop-analyzing-embed#0.2.0
npm ERR! Found: react#16.13.1
npm ERR! node_modules/react
npm ERR! react#"^16.13.1" from the root project
npm ERR! peer react#">=16.9.0" from #testing-library/react-hooks#3.3.0
npm ERR! node_modules/#testing-library/react-hooks
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.0.1" from react-test-renderer#17.0.1
npm ERR! node_modules/react-test-renderer
npm ERR! peer react-test-renderer#">=16.9.0" from #testing-library/react-hooks#3.3.0
npm ERR! node_modules/#testing-library/react-hooks
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/shoaibkhan/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/shoaibkhan/.npm/_logs/2021-01-26T14_56_13_324Z-debug.log
ShoaibKhansMBP:app shoaibkhan$ npm run dev
stop-analyzing-embed#0.2.0 dev
REACT_APP_BACKEND_URL=http://localhost:8008 yarn start
sh: yarn: command not found
npm ERR! code 127
npm ERR! path /Users/shoaibkhan/Documents/Treehouse/Open Source Projects/stop-analyzing-embed/app
npm ERR! command failed
npm ERR! command sh -c REACT_APP_BACKEND_URL=http://localhost:8008 yarn start
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/shoaibkhan/.npm/_logs/2021-01-26T14_56_33_589Z-debug.log
ShoaibKhansMBP:app shoaibkhan$
Can someone please help me to get this running.
Thanks,
Shoaib Kamal Khan
The error message tells us that yarn is not installed. Looking at the dev script inside the package.json we can see the actual command that is run:
"dev": "REACT_APP_BACKEND_URL=http://localhost:8008 yarn start",
The problem is that it's not listed as a (dev-) dependency in the package.json (you might want to create a PR for that), hence you don't get it installed when doing npm i .
To fix this and install yarn, you should run the following:
npm i -D yarn or install it globally using npm i -g yarn.
Related
I am trying to build ionic app and this error shows:
ionic build
> vue-cli-service build
[INFO] Looks like #vue/cli-service isn't installed in this project.
This package is required for this command to work properly.
? Install #vue/cli-service? Yes
> npm i -D -E #vue/cli-service
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ionic-files#0.0.1
npm ERR! Found: #capacitor/core#2.4.6
npm ERR! node_modules/#capacitor/core
npm ERR! #capacitor/core#"2.4.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #capacitor/core#"~2.5.0" from #capacitor/android#2.5.0
npm ERR! node_modules/#capacitor/android
npm ERR! #capacitor/android#"^2.4.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 /home/sariful/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sariful/.npm/_logs/2022-11-07T09_21_25_101Z-debug-0.log
[ERROR] An error occurred while running subprocess npm.
npm i -D -E #vue/cli-service exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
USE COMMAND
npm install --force for install npm
and if you want to install any other dependency then just add --force tag
after you command.
The error seem pretty self-explainatory, to point out which part: retry this command with --force, or --legacy-peer-deps
Differences between the two:
--legacy-peer-deps: ignore all peerDependencies when installing, in the style of npm version 4 through version 6.
--force: will force npm to fetch remote resources even if a local copy exists on disk.
For more info: npm: When to use --force and --legacy-peer-deps
From personal experience such similar package issues can be fixed by upgrading NPM version, or I prefer to use NVM so I can switch back and forth the NPM versions, but caution: this can break your other packages, so I suggest you to try the first solution first.
i am new to npm, and have trouble running npm install on this repo: https://github.com/ttencate/jfxr
after the initial install failed with error code 1, i found resources pointing towards updating the package versions.
after running
npx npm-check-updates -u
npm install still fails, this time with a reasonable error stack:
p#MBP-von-up app % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: jfxr-app#0.14.0
npm ERR! Found: eslint#8.19.0
npm ERR! node_modules/eslint
npm ERR! dev eslint#"^8.19.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#">=1.6.0 <7.0.0" from eslint-loader#2.2.1
npm ERR! node_modules/eslint-loader
npm ERR! dev eslint-loader#"^2.1.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! See /Users/tp/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/tp/.npm/_logs/2022-07-05T13_34_08_046Z-debug-0.log
but i am still unclear on how to resolve this version mismatch.
also, running with the old version would be fine for me too, if it worked at all...
any help / tips towards resources appreciated!
I just installed Ionic with
npm install -g #ionic/cli
When I try to run
ionic start ionic-test-app
the initialization fails with a npm dependency error.
Something about a wrong version of a package called postcss.
$ ionic start ionic-test-app
Pick a framework! 😁
Please select the JavaScript framework to use for your new app. To bypass this prompt next time,
supply a value for the --type option.
? Framework: Angular
Let's pick the perfect starter template! 💪
Starter templates are ready-to-go Ionic apps that come packed with everything you need to build your
app. To bypass this prompt next time, supply template, the second argument to ionic start.
? Starter template: blank
? ./ionic-test-app exists. Overwrite? Yes
✔ Preparing directory ./ionic-test-app in 6.79ms
✔ Downloading and extracting blank starter in 188.52ms
? Integrate your new app with Capacitor to target native iOS and Android? Yes
> ionic integrations enable capacitor --quiet -- ionic-test-app io.ionic.starter
> npm i --save -E #capacitor/core#latest
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: postcss#8.2.14
npm ERR! node_modules/postcss
npm ERR! postcss#"8.2.14" from #angular-devkit/build-angular#0.1102.13
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1102.4" from the root project
npm ERR! peer #angular-devkit/build-angular#"^0.1102.4" from #ionic/angular-toolkit#3.1.1
npm ERR! node_modules/#ionic/angular-toolkit
npm ERR! dev #ionic/angular-toolkit#"^3.1.1" from the root project
npm ERR! peer postcss#"^8.1.0" from autoprefixer#10.2.4
npm ERR! node_modules/autoprefixer
npm ERR! autoprefixer#"10.2.4" from #angular-devkit/build-angular#0.1102.13
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1102.4" from the root project
npm ERR! 1 more (#ionic/angular-toolkit)
npm ERR! 9 more (css-loader, cssnano, postcss-import, postcss-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer postcss#"^8.2.15" from cssnano-preset-default#5.1.0
npm ERR! node_modules/cssnano/node_modules/cssnano-preset-default
npm ERR! cssnano-preset-default#"^5.0.1" from cssnano#5.0.2
npm ERR! node_modules/cssnano
npm ERR! cssnano#"5.0.2" from #angular-devkit/build-angular#0.1102.13
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1102.4" from the root project
npm ERR! 1 more (#ionic/angular-toolkit)
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/sekthor/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sekthor/.npm/_logs/2021-05-20T17_05_21_790Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i --save -E #capacitor/core#latest exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Installing dependencies may take several minutes.
──────────────────────────────────────────────────────────────────────────────
Ionic Advisory, tailored solutions and expert services by Ionic
Go to market faster 🏆
Real-time troubleshooting and guidance 💁
Custom training, best practices, code and architecture reviews 🔎
Customized strategies for every phase of the development lifecycle 🔮
👉 https://ion.link/advisory 👈
──────────────────────────────────────────────────────────────────────────────
> npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: postcss#8.2.14
npm ERR! node_modules/postcss
npm ERR! postcss#"8.2.14" from #angular-devkit/build-angular#0.1102.13
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1102.4" from the root project
npm ERR! peer #angular-devkit/build-angular#"^0.1102.4" from #ionic/angular-toolkit#3.1.1
npm ERR! node_modules/#ionic/angular-toolkit
npm ERR! dev #ionic/angular-toolkit#"^3.1.1" from the root project
npm ERR! peer postcss#"^8.1.0" from autoprefixer#10.2.4
npm ERR! node_modules/autoprefixer
npm ERR! autoprefixer#"10.2.4" from #angular-devkit/build-angular#0.1102.13
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1102.4" from the root project
npm ERR! 1 more (#ionic/angular-toolkit)
npm ERR! 9 more (css-loader, cssnano, postcss-import, postcss-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer postcss#"^8.2.15" from cssnano-preset-default#5.1.0
npm ERR! node_modules/cssnano/node_modules/cssnano-preset-default
npm ERR! cssnano-preset-default#"^5.0.1" from cssnano#5.0.2
npm ERR! node_modules/cssnano
npm ERR! cssnano#"5.0.2" from #angular-devkit/build-angular#0.1102.13
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1102.4" from the root project
npm ERR! 1 more (#ionic/angular-toolkit)
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/sekthor/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sekthor/.npm/_logs/2021-05-20T17_05_28_760Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I am fairly new to npm and I can't seem to find a solution on this site or anywhere else on the internet.
I have tried both the --force and --legacy-peer-deps, but received the same error.
What is the reason for this error and how do I fix it?
My node, npm & ionic versions are:
$ node --version
v16.2.0
$ npm --version
7.13.0
$ ionic --version
6.16.1
That was my first guess - installing a more recent version of postcss, but unfortunately that did not solve it for me. Solution was downgrading from npm's version 7 to version 6.
npm install -g npm#6
For some reason I couldn't get it to work on node version 16.2.0.
However, using node version manager nvm I installed a second instance of node, the LTS version 14.17.0.
With this downgrade, the setup process works.
nvm install 14.17.0
I ran into this error and manually installing postcss npm i postcss fixed it as the stack trace shows a dependency was relying on the latest version of postcss version 8.2.15 and what was found was version 8.2.14.
Had a similar issue with node start using npm v7.5.2 and was fixed by upgrading to v7.22.0.
I'm trying to install the Next.js/Preact.js setup from vercel and I get the following error:
> npx create-next-app --example using-preact using-preact-app
Need to install the following packages:
create-next-app
Ok to proceed? (y) y
Creating a new Next.js app in /home/somayyah/Documents/using-preact-app.
Downloading files for example using-preact. This might take a moment.
Installing packages. This might take a couple of minutes.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: using-preact#1.0.0
npm ERR! Found: react#0.0.3
npm ERR! node_modules/react
npm ERR! react#"npm:#preact/compat#^0.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.6.0 || ^17" from next#10.0.6
npm ERR! node_modules/next
npm ERR! next#"^10.0.0" 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/somayyah/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/somayyah/.npm/_logs/2021-02-13T17_16_32_165Z-debug.log
I tried setting up Preact by myself on another project and I had the same issue, how can I get around this?
I think this is a bug related to npx. i am using yarn create next-app --example using-preact using-preact-app and it is installed successfully but unfortunately it looks like the example is not working and throws the error Could not find module' webpack
I'm trying to learn react/typescript and I'm following a tutorial line for line, but somehow getting this error when trying to install either #chakra-ui/react or #chakra-ui/core. It seems like a dependecy issue with react having been updated. Should I rollback react?
kyoudai.industries git:(master) ✗ npm install #chakra-ui/react framer-motion
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: kyoudai.industries#1.0.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! peer react#"16.x || 17.x" from #chakra-ui/react#1.0.1
npm ERR! node_modules/#chakra-ui/react
npm ERR! #chakra-ui/react#"*" from the root project
npm ERR! 2 more (#emotion/react, #emotion/styled)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8" from framer-motion#2.9.4
npm ERR! node_modules/framer-motion
npm ERR! framer-motion#"*" from the root project
npm ERR! peer framer-motion#"^2.9.4" from #chakra-ui/react#1.0.1
npm ERR! node_modules/#chakra-ui/react
npm ERR! #chakra-ui/react#"*" 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/travis/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/travis/.npm/_logs/2020-11-24T22_38_57_297Z-debug.log
With this command you can solve the problem:
npm i #chakra-ui/react --legacy-peer-deps
I had the same issue but in Vue. I ran the following commands and it started working:
vue create test -p default && cd test && vue serve src/main.js,
It seems like it created a folder running some tests.
Then I ran: npm i -g #vue/cli-service-global..
Then: npm run serve-- to initiate the vue server.
Hopefully it gives you an idea how to solve that in React.
Good luck!