环境
win10 64位, node 16.6.1 , npm 7.20.5
网上转了一圈都说是node版本的问题,费劲扒拉安装的最新版node让我换版本-------不可能。 于是乎每天下班找解决方案,三天时间尝试了各种搜到的方法,依然无果。正当想要放弃时,灵机一动,想到既然说找不到fibers,我就给他一个。
完整错误信息:
INFO Starting development server...
40% building 33/44 modules 11 active E:\project\node_modules\loglevel\lib\loglevel.js
`E:\project\node_modules\fibers\bin\win32-x64-93\fibers.node` is missing.
Try running this to fix the issue: E:\Program Files\nodejs\node.exe E:\project\node_modules\fibers/build
Error: Cannot find module 'E:\project\node_modules\fibers\bin\win32-x64-93\fibers'
Require stack:
- E:\project\node_modules\fibers\fibers.js
- E:\project\node_modules\sass-loader\dist\utils.js
- E:\project\node_modules\sass-loader\dist\index.js
- E:\project\node_modules\sass-loader\dist\cjs.js
- E:\project\node_modules\loader-runner\lib\loadLoader.js
- E:\project\node_modules\loader-runner\lib\LoaderRunner.js
- E:\project\node_modules\webpack\lib\NormalModule.js
- E:\project\node_modules\webpack\lib\NormalModuleFactory.js
- E:\project\node_modules\webpack\lib\Compiler.js
- E:\project\node_modules\webpack\lib\webpack.js
- E:\project\node_modules\@vue\cli-service\lib\commands\serve.js
- E:\project\node_modules\@vue\cli-service\lib\Service.js
- E:\project\node_modules\@vue\cli-service\bin\vue-cli-service.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (E:\project\node_modules\fibers\fibers.js:14:39)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at getSassOptions (E:\project\node_modules\sass-loader\dist\utils.js:142:25)
at Object.loader (E:\project\node_modules\sass-loader\dist\index.js:43:55)
at LOADER_EXECUTION (E:\project\node_modules\loader-runner\lib\LoaderRunner.js:119:14)
at runSyncOrAsync (E:\project\node_modules\loader-runner\lib\LoaderRunner.js:120:4)
at iterateNormalLoaders (E:\project\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
E:\project\node_modules\fibers\fibers.js:23
throw new Error('Missing binary. See message above.');
^
Error: Missing binary. See message above.
at Object.<anonymous> (E:\project\node_modules\fibers\fibers.js:23:9)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at getSassOptions (E:\project\node_modules\sass-loader\dist\utils.js:142:25)
at Object.loader (E:\project\node_modules\sass-loader\dist\index.js:43:55)
at LOADER_EXECUTION (E:\project\node_modules\loader-runner\lib\LoaderRunner.js:119:14)
at runSyncOrAsync (E:\project\node_modules\loader-runner\lib\LoaderRunner.js:120:4)
at iterateNormalLoaders (E:\project\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
at Array.<anonymous> (E:\project\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (E:\project\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at E:\project\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
at E:\project\node_modules\graceful-fs\graceful-fs.js:123:16
问题分析:
因为node-fibers这个模块导致的错误,大概是加载的时候因为缺少win32-x64-93\fibers.node失败了
解决方法:
在github下载对应系统版本的node文件,并创建对应路径的文件夹
打开链接后直接Ctrl+F搜索报错的版本win32-x64-93 后缀名为 .node
win32-x64-93_binding.node 文件下载地址:github-releases
下载后改名为fibers.node 并创建对应版本文件夹win32-x64-93 然后复制进去
最后在项目根目录分别执行如下命令:
npm install
npm run dev
然后就没然后了
|