解决ERROR Error: Cannot find module ‘@sentry/webpack-plugin‘,或Unable to download sentry-cli binary 问题

Posted 秋9

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决ERROR Error: Cannot find module ‘@sentry/webpack-plugin‘,或Unable to download sentry-cli binary 问题相关的知识,希望对你有一定的参考价值。

【现象】

 

D:\\work\\ideaIU-2017.3.1.win\\bin\\runnerw.exe "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" run dev --scripts-prepend-node-path=auto

> manager@4.2.1 dev D:\\work\\idea\\managerfront
> vue-cli-service serve --open

 ERROR  Error loading vue.config.js:
 ERROR  Error: Cannot find module '@sentry/webpack-plugin'
 Require stack:
- D:\\work\\idea\\managerfront\\vue.config.js
- D:\\work\\idea\\managerfront\\node_modules\\@vue\\cli-service\\lib\\Service.js
- D:\\work\\idea\\managerfront\\node_modules\\@vue\\cli-service\\bin\\vue-cli-service.js
Error: Cannot find module '@sentry/webpack-plugin'
Require stack:
- D:\\work\\idea\\managerfront\\vue.config.js
- D:\\work\\idea\\managerfront\\node_modules\\@vue\\cli-service\\lib\\Service.js
- D:\\work\\idea\\managerfront\\node_modules\\@vue\\cli-service\\bin\\vue-cli-service.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (D:\\work\\idea\\managerfront\\vue.config.js:14:22)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! manager@4.2.1 dev: `vue-cli-service serve --open`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the manager@4.2.1 dev 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\\admin\\AppData\\Roaming\\npm-cache\\_logs\\2021-10-06T03_02_01_216Z-debug.log

Process finished with exit code 1

【解决方法】

下载地址https://download.csdn.net/download/jlq_diligence/28725246,下载后

放在vue项目node_modules目录下

以上是关于解决ERROR Error: Cannot find module ‘@sentry/webpack-plugin‘,或Unable to download sentry-cli binary 问题的主要内容,如果未能解决你的问题,请参考以下文章

Error: Cannot find module ‘dotenv‘解决方法

Error: Cannot find module ‘dotenv‘解决方法

解决CentOS遇到Qt编译(error: cannot find -lGL)

解决CentOS遇到Qt编译(error: cannot find -lGL)

Node.js Error: Cannot find module express的解决办法

Error: Cannot find module ‘dotenv‘的解决方法