[英]npm install error in laravel 5.6 with fresh installation
I get the following error while running npm install
on a fresh laravel 5.6
installation on windows 7 32 bit
, npm version 5.7.1
, node v9.5.0
在
windows 7 32 bit
, npm version 5.7.1
, node v9.5.0
上的新laravel 5.6
安装上运行npm install
时出现以下错误
npm ERR!
错误的ERR! path D:\\xampp\\htdocs\\2018\\thehealthsearch\\node_modules\\node-sass\\node_modules\\har-validator\\bin\\har-validator npm ERR!
路径D:\\ xampp \\ htdocs \\ 2018 \\ thehealthsearch \\ node_modules \\ node-sass \\ node_modules \\ har-validator \\ bin \\ har-validator npm ERR! code ENOENT npm ERR!
代码ENOENT npm ERR! errno -4058 npm ERR!
errno -4058 npm ERR! syscall chmod npm ERR!
系统调用chmod npm ERR! enoent ENOENT: no such file or directory, chmod 'D:\\xampp\\htdocs\\2018\\thehealthsearch\\node_modules\\node-sass\\no de_modules\\har-validator\\bin\\har-validator' npm ERR!
enoent ENOENT:没有这样的文件或目录,chmod'D:\\ xampp \\ htdocs \\ 2018 \\ thehealthsearch \\ node_modules \\ node-sass \\ no de_modules \\ har-validator \\ bin \\ har-validator'npm ERR! enoent This is related to npm not being able to find a file.
enoent这与npm无法找到文件有关。 npm ERR!
错误的ERR! enoent
ENOENT
npm ERR! A complete log of this run can be found in: npm ERR! C:\\Users\\user\\AppData\\Roaming\\npm-cache\\_logs\\2018-03-14T05_58_42_171Z-debug.log
How to resolve this? 怎么解决这个?
EDIT : 编辑:
My Package.json file 我的Package.json文件
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.18",
"bootstrap": "^4.0.0",
"popper.js": "^1.12",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^2.0",
"lodash": "^4.17.4",
"vue": "^2.5.16"
},
"dependencies": {
"har-validator": "^5.1.0",
"yarn": "^0.16.1"
}
}
You need to try this commands line by line: 您需要逐行尝试此命令:
npm cache clean
npm install -g gulp bower
npm install
bower install
gulp & gulp watch
This commands do: 这个命令可以:
for cleaning a cache of npm 用于清理npm的缓存
installs gulp bower globally 全球安装gulp凉亭
installs npm 安装npm
installs bower 安装凉亭
for mixing all js and css and watch on all changes of css & js 混合所有js和css并观察css和js的所有变化
Hope this will helps you and fixed your issue! 希望这会帮助您解决问题!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.