简体   繁体   English

无法运行> Laravel上的npm run watch

[英]Can't run > npm run watch on Laravel

I have installed NodeJS v10.9.0 NodeJS version & NPM 6.2.0. 我已经安装了NodeJS v10.9.0 NodeJS版本和NPM 6.2.0。 I try to developing Laravel with VueJS from Laravel fresh installation. 我尝试使用Laravel全新安装的VueJS开发Laravel。 I installed below devDependencies inside package.json : 我在package.json里面的devDependencies下面安装了:

  "devDependencies": {
    "axios": "^0.18",
    "bootstrap": "^4.0.0",
    "cross-env": "^5.1",
    "jquery": "^3.2",
    "laravel-mix": "^1.7.2",
    "lodash": "^4.17.5",
    "popper.js": "^1.12",
    "resolve-url-loader": "^2.3.1",
    "sass": "^1.15.2",
    "sass-loader": "^7.1.0",
    "vue": "^2.5.17",
    "webpack-cli": "^3.3.0"
  }

After installation, I got some messages like this : 安装后,我收到了一些如下消息:

notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) notsup跳过可选依赖项:fsevents@1.2.7不受支持的平台:通缉{“ os”:“ darwin”,“ arch”:“ any”}(当前:{“ os”:“ win32”,“ arch”:“ x64 “})

And this : 和这个 :

added 333 packages from 293 contributors and audited 26962 packages in 117.917s found 27 vulnerabilities (19 low, 7 moderate, 1 high) run npm audit fix to fix them, or npm audit for details 添加了293个贡献者的333个程序包,并在117.917s中对26962个程序包进行了审核,发现27个漏洞(19个低,7个中等,1个高)运行npm audit fix以进行修复,或通过npm audit获取详细信息

And then I try to npm run watch but failed, and shows this message : 然后我尝试npm run watch但失败了,并显示此消息:

internal/modules/cjs/loader.js:583 throw err; internal / modules / cjs / loader.js:583 throw err; ^ ^

Error: Cannot find module 'C:\\0Projects\\Laravel\\larastore\\node_modules\\laravel-mix\\setup\\webpack.config.js' 错误:找不到模块“ C:\\ 0Projects \\ Laravel \\ larastore \\ node_modules \\ laravel-mix \\ setup \\ webpack.config.js”

And then I check the node_modules and try to find the specific file, but it's none. 然后,我检查node_modules并尝试查找特定的文件,但是没有。 How to fix this? 如何解决这个问题?

Laravel Mix and other packages are not installed. 未安装Laravel Mix和其他软件包。 use npm install laravel-mix . 使用npm install laravel-mix

Check package.json and will be able to find which other modules you need. 检查package.json,将能够找到您需要的其他模块。 You might also need package like cross-env . 您可能还需要像cross-env这样的包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM