npm WARN deprecated fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 npm ERR! cb() never called! npm ERR! This is an error with npm itself. Please report this error at: npm ERR! https://npm.community npm ERR! A complete log of this run can be found in: npm ERR! C:\Program Files\nodejs\node_cache_logs\2023-07-14T06_56_55_214Z-debug.log
时间: 2023-07-23 11:11:13 浏览: 322
根据您提供的错误日志,看起来是由于 npm 自身的错误导致的问题。请按照以下步骤尝试解决该问题:
1. 确保您使用的是最新版本的 npm。可以运行以下命令进行更新:
```bash
npm install -g npm
```
2. 清除 npm 的缓存。运行以下命令清除缓存:
```bash
npm cache clean --force
```
3. 如果上述步骤没有解决问题,请尝试重新安装 Node.js。首先卸载当前的 Node.js 版本,然后从 Node.js 官方网站(https://nodejs.org)下载最新的稳定版本,并进行安装。
4. 如果问题仍然存在,请将完整的错误日志提交给 npm 社区(https://npm.community)进行反馈。他们可能会为您提供更详细的帮助和解决方案。
希望这些步骤能帮助您解决问题。如果您有其他疑问,请随时提问。
相关问题
yarn add opencv-js yarn add v1.22.19 warning package.json: "dependencies" has dependency "css-loader" with range "^0.28.1" that collides with a dependency in "devDependencies" of the same name with version "^0.28.0" warning package.json: "dependencies" has dependency "webpack" with range "^2.5.0" that collides with a dependency in "devDependencies" of the same name with version "^2.2.1" warning package.json: "dependencies" has dependency "webpack-dev-server" with range "^2.4.5" that collides with a dependency in "devDependencies" of the same name with version "^2.3.0" warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. warning arc@0.1.0: "dependencies" has dependency "css-loader" with range "^0.28.1" that collides with a dependency in "devDependencies" of the same name with version "^0.28.0" warning arc@0.1.0: "dependencies" has dependency "webpack" with range "^2.5.0" that collides with a dependency in "devDependencies" of the same name with version "^2.2.1" warning arc@0.1.0: "dependencies" has dependency "webpack-dev-server" with range "^2.4.5" that collides with a dependency in "devDependencies" of the same name with version "^2.3.0" [1/4] Resolving packages... warning dragact > jest > jest-cli > jest-haste-map > sane > fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 warning webpack > watchpack > watchpack-chokidar2 > chokidar > fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 warning @kadira/storybook > webpack > watchpack > chokidar > fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 error Received malformed response from registry for "opencv-js". The registry may be down. info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command
这个错误提示是因为npm仓库可能出现了一些问题,导致无法下载opencv-js包。您可以尝试等待一段时间后再次运行命令,或者尝试使用其他的npm源来下载opencv-js包。您可以使用以下命令来尝试更改npm源:
```
npm config set registry https://registry.npm.taobao.org
```
然后再次运行以下命令来安装opencv-js包:
```
yarn add opencv-js
```
如果还是无法下载,您可以尝试使用其他的npm源,例如:
```
npm config set registry https://registry.npmjs.org/
```
然后再次运行以下命令来安装opencv-js包:
```
yarn add opencv-js
```
希望这些方法能够帮助您解决问题。
gyp ERR! cwd C:\Users\27538\Desktop\电商示例\dianshang-web\node_modules\node-sass gyp ERR! node -v v10.15.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\watchpack\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.12.0 postinstall 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\27538\AppData\Roaming\npm-cache\_logs\2023-06-05T13_22_33_873Z-debug.log
这个错误提示是由于 node-sass 的编译失败导致的。通常这是由于缺少某些编译工具或缺少依赖项引起的。
解决方法如下:
1.确保已安装所有必要的构建工具:
在 Windows 上,您需要安装 Microsoft Visual Studio Build Tools。 您可以在以下链接中下载并安装:https://visualstudio.microsoft.com/downloads/
在安装过程中,请选择“使用 C++ 的桌面开发”和“使用 Python 2.7”。
2.清除 npm 缓存:
打开命令行工具,进入到您的项目目录中,并执行以下命令以清除 npm 缓存:
```
npm cache clean --force
```
3.重新安装 node-sass:
执行以下命令以重新安装 node-sass:
```
npm uninstall node-sass
npm install node-sass
```
如果您使用 Yarn,请使用以下命令:
```
yarn remove node-sass
yarn add node-sass
```
这样就可以解决这个错误了。
阅读全文