serverlesspub / pizzeria-web-app

A simple React-based web application that connects to Serverless Pizzeria API
20 stars 3 forks source link

Could not resolve dependency #31

Open fernubio opened 2 years ago

fernubio commented 2 years ago

When I run the npm run start command I got this error message:

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: serverless-pizzeria-frontend@0.1.0 npm ERR! Found: aws-amplify@2.2.0 npm ERR! node_modules/aws-amplify npm ERR! aws-amplify@"^2.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer aws-amplify@"^1.x" from aws-amplify-react@3.1.1 npm ERR! node_modules/aws-amplify-react npm ERR! aws-amplify-react@"^3.1.1" from the root project

Emiria486 commented 9 months ago

When I run the npm run start command I got this error message:

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: serverless-pizzeria-frontend@0.1.0 npm ERR! Found: aws-amplify@2.2.0 npm ERR! node_modules/aws-amplify npm ERR! aws-amplify@"^2.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer aws-amplify@"^1.x" from aws-amplify-react@3.1.1 npm ERR! node_modules/aws-amplify-react npm ERR! aws-amplify-react@"^3.1.1" from the root project

you can fix it by npm install --force the fix the packjson scripts part like this:"scripts": { "start": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start", "build": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts build", "test": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts test", "eject": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts eject" },then npm run start you can run this app