Home > Mobile >  npm not being able to find a file
npm not being able to find a file

Time:10-10

I am currently trying to follow a tutorial on how to make a google maps clone and I am now done with the build I then tried to run the npm start command but when I do I get the following errors:

npm ERR! code ENOENT

npm ERR! syscall open

npm ERR! path C:\Users\mikai\OneDrive\Skrivebord\Code\websites\Maps\package.json

npm ERR! errno -4058

npm ERR! enoent ENOENT: no such file or directory, open 
'C:\Users\example\example\example\example\example\example\example'

npm ERR! enoent This is related to npm not being able to find a file.

npm ERR! enoent

I a have already tried to clear my cache by running the command npm cache clean and then run npm start but I still get the same errors is there anybody that has run into the same errors and found a solution?

here the link to the tutorial: https://javascript.plainenglish.io/build-a-google-maps-clone-in-less-than-20-minutes-6f7c68db13e

here is the package.json file:

{
 "name": "google-maps-clone",
 "version": "0.1.0",
 "private": true,
 "dependencies": {
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "^11.2.7",
    "@testing-library/user-event": "^12.8.3",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "4.0.3",
    "web-vitals": "^1.1.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
  "extends": [
      "react-app",
      "react-app/jest"
   ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

CodePudding user response:

Try to delete package-lock.json.

After deleting this file use the npm install command.

CodePudding user response:

I found the error i had multiple package.json files that werent placed in the right places

  • Related