I got some error message 'Cannot find module ..\acorn.js' when write 'npm start'

enter image description here

package.json

{"name": "eats-mate-frontend","version": "0.1.0","private": true,"dependencies": {"@testing-library/jest-dom": "^5.16.4","@testing-library/react": "^13.3.0","@testing-library/user-event": "^13.5.0","acorn": "^8.8.0","axios": "^0.27.2","bootstrap": "^5.1.3","react": "^18.2.0","react-bootstrap": "^2.4.0","react-dom": "^18.2.0","react-kakao-maps-sdk": "^1.1.1","react-persist": "^1.0.2","react-redux": "^8.0.2","react-responsive-carousel": "^3.2.23","react-router-dom": "^6.3.0","react-scripts": "5.0.1","redux": "^4.2.0","redux-persist": "^6.0.0","redux-promise": "^0.6.0","redux-thunk": "^2.4.1","save": "^2.5.0","slick-carousel": "^1.8.1","source-map": "^0.7.4","styled-components": "^5.3.5","web-vitals": "^2.1.4"},"scripts": {"start": "react-scripts start","build": "react-scripts build","test": "react-scripts test","eject": "react-scripts eject"},"browserslist": {"production": [">0.2%","not dead","not op_mini all"],"development": ["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"devDependencies": {"@types/acorn": "^6.0.0"}

}

Below is my node_modules' contents that start with 'a'I cannot find node_modules\acorn , as terminal's error message said.But I already done 'npm install --save acorn' and no new folders related to acorn has been created in node_modules.

enter image description here

Even I removed package-lock.json file and write 'npm install', it didn't work to solve the problem.

Please help!

2

Best Answer


delete your node_modules folder, and your package-lock.json, and then run npm install

first you should remove acorn from package and npm install once you finish try to install it alone.