zhoutaoo / SpringCloud-Admin

微服务后台通用管理系统
MIT License
336 stars 237 forks source link

master分支npm install失败 #13

Open gengchaogit opened 1 year ago

gengchaogit commented 1 year ago

npm ERR! code 1 npm ERR! path C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\node-sass npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/install.js npm ERR! C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\gauge\wide-truncate.js:2 npm ERR! var stringWidth = require('string-width') npm ERR! ^ npm ERR! npm ERR! Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\string-width\index.js from C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\gauge\wide-truncate.js not supported. npm ERR! Instead change the require of index.js in C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\gauge\wide-truncate.js to a dynamic import() which is available in all CommonJS modules. npm ERR! at Object. (C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\gauge\wide-truncate.js:2:19) npm ERR! at Object. (C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\gauge\render-template.js:5:20) npm ERR! at Object. (C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\gauge\plumbing.js:3:22) npm ERR! at Object. (C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\gauge\index.js:2:16) npm ERR! at Object. (C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\npmlog\log.js:3:13) npm ERR! at Object. (C:\Users\test\IdeaProjects\SpringCloud-Admin\node_modules\node-sass\scripts\install.js:11:9) { npm ERR! code: 'ERR_REQUIRE_ESM' npm ERR! } npm ERR! npm ERR! Node.js v18.14.2

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\test\AppData\Local\npm-cache_logs\2023-04-28T14_53_57_022Z-debug-0.log

gengchaogit commented 1 year ago

尝试在package.json中添加string-width依赖,但是会接着缺少别的依赖,是我用的nodejs版本太高?