gpt4 book ai didi

node.js - 错误: Cannot find module '../lib/utils/unsupported.js' on window10

转载 作者:行者123 更新时间:2023-12-02 19:54:30 24 4
gpt4 key购买 nike

当我安装任何 npm 包时,例如:npm i lodash、npm i bcrypt 等...,它会出现如下错误:

Error: Cannot find module '../lib/utils/unsupported.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:19:21
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:153:3)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
internal/modules/cjs/loader.js:582
throw err;

最佳答案

accepted answer 的版本适应OSX:

rm -rf /usr/local/lib/node_modules
brew reinstall node

关于node.js - 错误: Cannot find module '../lib/utils/unsupported.js' on window10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57353545/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com