lapmvel 5.6中的npm安装错误,全新安装

时间:2018-03-14 06:09:00

标签: node.js laravel npm laravel-5.6

npm installlaravel 5.6windows 7 32 bit

上的全新npm version 5.7.1安装上运行node v9.5.0时出现以下错误
  

npm ERR!路径   d:\ XAMPP \ htdocs中\ 2018 \ thehealthsearch \ node_modules \节点萨斯\ node_modules \哈日验证\ BIN \ HAR-验证       错误的ERR!代码ENOENT       错误的ERR! errno -4058       错误的ERR!系统调用chmod       错误的ERR! enoent ENOENT:没有这样的文件或目录,chmod'D:\ xampp \ htdocs \ 2018 \ thehealthsearch \ node_modules \ node-sass \ no       de_modules \ HAR-验证\ BIN \ HAR-验证”       错误的ERR! enoent这与npm无法找到文件有关。       错误的ERR! 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

如何解决这个问题?

编辑:

我的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"
    }
}

1 个答案:

答案 0 :(得分:3)

您需要逐行尝试此命令:

npm cache clean           
npm install -g gulp bower 
npm install               
bower install             
gulp & gulp watch         

此命令执行:

  1. 用于清除npm的缓存

  2. 全球安装gulp bower

  3. 安装npm

  4. 安装凉亭

  5. 用于混合所有js和css并观察css和amp;的所有变化JS

  6. 希望这会对您有所帮助并解决您的问题!