1

当我npm install在 Laravel 6 上运行时

我收到以下错误:

C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master>npm install
npm WARN deprecated babel-preset-es2015@6.24.1: �  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
npm WARN deprecated core-js@2.6.10: core-js@<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported
and may contain bugs and critical security issues.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported
and may contain bugs and critical security issues.
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

> node-sass@4.13.0 postinstall C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master\node_modules\node-sass
> node scripts/build.js

Binary found at C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master\node_modules\node-sass\vendor\win32-x64-72\binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1107 packages from 781 contributors and audited 14707 packages in 526.859s
found 21 vulnerabilities (2 low, 12 moderate, 7 high)
  run `npm audit fix` to fix them, or `npm audit` for details

在我运行npm audit fix --force之后npm run watch返回以下错误:

Error: Cannot find module 'C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master\node_modules\cross-env\bin\cross-env.js'
←[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)←[39m
←[90m    at Function.Module._load (internal/modules/cjs/loader.js:687:27)←[39m
←[90m    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)←[39m
←[90m    at internal/main/run_main_module.js:17:11←[39m {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch: `node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Hamid\AppData\Roaming\npm-cache\_logs\2019-12-02T05_33_19_426Z-debug.log

我也多次清除npm 缓存并重新安装 npm但问题没有解决

4

0 回答 0