5 npm
我刚刚购买了一台带有 M1 芯片的新 Mac,我想知道该错误是否与此有关,因为在我的旧 Mac 上没有问题。
[webpack-cli] Error: spawn Unknown system error -86
at ChildProcess.spawn (node:internal/child_process:412:11)
at spawn (node:child_process:698:9)
at Object.execFile (node:child_process:325:17)
at Object.module.exports.fileCommandJson (/Users/mlc/Sites/ImapImport/node_modules/node-notifier/lib/utils.js:88:13)
at NotificationCenter.notifyRaw (/Users/mlc/Sites/ImapImport/node_modules/node-notifier/notifiers/notificationcenter.js:81:11)
at WebpackNotifierPlugin.compilationDone (/Users/mlc/Sites/ImapImport/node_modules/webpack-notifier/index.js:129:14)
at Hook.eval [as callAsync] (eval at create (/Users/mlc/Sites/ImapImport/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:18:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/mlc/Sites/ImapImport/node_modules/tapable/lib/Hook.js:18:14)
at /Users/mlc/Sites/ImapImport/node_modules/webpack/lib/Compiler.js:498:23
at Compiler.emitRecords (/Users/mlc/Sites/ImapImport/node_modules/webpack/lib/Compiler.js:906:5) {
errno: -86,
code: 'Unknown system error -86',
syscall: 'spawn'
}
Run Code Online (Sandbox Code Playgroud)
启动命令时会发生这种情况:
npm run dev
Run Code Online (Sandbox Code Playgroud)
或者
yarn encore dev
Run Code Online (Sandbox Code Playgroud)
我已经尝试删除 node_modules 文件以及 package-lock.json,并清除 npm 缓存,然后重新运行 npm install 但没有任何效果。
建议?
小智 3
今天我也拿到了新的 M1 Pro,也遇到了同样的问题。有趣的是,npm run prod所有文件都正确创建了。
首先我检查是否xcode-select --install已安装 - 确实如此。
接下来我检查了安装的 git 版本git --version-> git version 2.32.0 (Apple Git-132),标准 Apple git。我通过 homebrew 安装了一个新的 gitbrew install git并重新启动了我的 Mac。之后错误就消失了。
如果这不能解决您的错误,则可能是一个奇怪的 npm 包。
| 归档时间: |
|
| 查看次数: |
3656 次 |
| 最近记录: |