After cloning a fullstack MERN (Typescript) project from GitHub, I encountered numerous errors in the code within VS code. It seemed like packages were missing or not installed properly. Whenever I tried to install them using commands like (npm install express), I kept receiving error messages like:
npm WARN idealTree Removing dependencies.@types/node in favor of devDependencies.@types/node
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@designed-and-developed%2feslint-config-prettier-typescript-react - Not found
npm ERR! 404
npm ERR! 404 '@designed-and-developed/eslint-config-prettier-typescript-react@^1.0.9' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
Upon researching, I discovered that these errors might be related to having an npm account and signing into it. However, I prefer running the website locally without dealing with these package installation issues. How can I resolve this?
Here is my package.json file for reference:
{
"name": "lofi-env",
"version": "1.0.0",
"main": "index.js",
"repository": "https://github.com/ni-xon/lofi-env.git",
"author": "ni-xon <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="83edeafbecedf6e0ebdcc3ecf6f7efecece8ade0ecee">[email protected]</a>>",
"license": "MIT",
"scripts": {
"server": "nodemon --config nodemon.json backend/server.ts",
"client": "yarn --cwd frontend start",
"start": "yarn server",
"dev": "concurrently \"yarn server\" \"yarn client\"",
"heroku-postbuild": "cd frontend && npm install && npm run build"
},
"devDependencies": {
"@designed-and-developed/eslint-config-prettier-typescript-react": "^1.0.9",
"eslint": "^8.10.0",
"prettier": "^2.5.1"
},
"dependencies": {
"@types/bcrypt": "^5.0.0",
"@types/express": "^4.17.13",
"@types/jsonwebtoken": "^8.5.8",
"@types/mongoose": "^5.11.97",
"@types/node": "^17.0.21",
"bcrypt": "^5.0.1",
"concurrently": "^7.0.0",
"dotenv": "^16.0.0",
"express": "^4.17.3",
"express-async-handler": "^1.2.0",
"jsonwebtoken": "^8.5.1",
"mongoose": "^6.2.4",
"nodemon": "^2.0.15",
"ts-node": "^10.7.0",
"typescript": "^4.6.2"
}
}
The NPM command still triggers the same error message regardless of how I call it (even when running NPM install!). Any guidance on fixing this would be greatly appreciated.
Thank you.