when I try to install dependencies for my package i receive the folowing error
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! path C:\Users\user_name\Desktop\typeScript_react_webpack_app_template\node_modules\typescript
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\user_name\Desktop\typeScript_react_webpack_app_template\node_modules\typescript' -> 'C:\Users\user_name\Desktop\typeScript_react_webpack_app_template\node_modules\.typescript.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user_name\AppData\Roaming\npm-cache\_logs\2017-07-07T08_55_48_803Z-debug.log
my package.json
{
"name": "package",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-preset-es2017": "^6.24.1",
"babel-preset-react": "^6.24.1",
"ts-loader": "^2.2.2",
"typescript": "^2.4.1",
"webpack": "^3.0.0"
},
"dependencies": {
"react": "^15.6.1",
"react-dom": "^15.6.1"
}
}
if I install package as npm install typescript all works fine. What can be solution for this problem?
delete package-lock.json and run npm again
Check if node and npm is installed correctly
for checking type
npm -v
if no number came then install it properly.
If any number cam then the npm is installed, then go ahead
Quick fix:-delete package-lock.json and try again
If above does not work, then do below steps
1) delete package-lock.json
2) open task manager and shut down all nodejs process
3) run npm init or npm install
4) if not works, then restart your system
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With