节点获取:不支持 URL 类型 "node:":node:buffer
node-fetch: Unsupported URL Type "node:": node:buffer
我需要 node-fetch 为 VUE JS 项目工作,但我 运行 陷入这些依赖项错误:
These dependencies were not found:
* node:buffer in ./node_modules/node-fetch/src/index.js, ./node_modules/node-fetch/src/body.js
* node:http in ./node_modules/node-fetch/src/index.js, ./node_modules/node-fetch/src/headers.js
* node:https in ./node_modules/node-fetch/src/index.js
* node:net in ./node_modules/node-fetch/src/utils/referrer.js
* node:stream in ./node_modules/node-fetch/src/index.js, ./node_modules/node-fetch/src/body.js
* node:url in ./node_modules/node-fetch/src/request.js
* node:util in ./node_modules/node-fetch/src/body.js, ./node_modules/node-fetch/src/headers.js and 1 other
* node:zlib in ./node_modules/node-fetch/src/index.js
To install them, you can run: npm install --save node:buffer node:http node:https node:net node:stream node:url node:util node:zlib
我尝试 run npm install --save node:buffer node:http node:https node:net node:stream node:url node:util node:zlib
但出现此错误:
npm ERR! code EUNSUPPORTEDPROTOCOL npm ERR!
Unsupported URL Type "node:": node:buffer
如何安装缺少的依赖项?
(我在 UBUNTU 18.04.6 LTS 上使用 NODE JS v16.13.2)
运行 这个命令没有 (node:):
npm install --save buffer http https net stream url util zlib
我需要 node-fetch 为 VUE JS 项目工作,但我 运行 陷入这些依赖项错误:
These dependencies were not found:
* node:buffer in ./node_modules/node-fetch/src/index.js, ./node_modules/node-fetch/src/body.js
* node:http in ./node_modules/node-fetch/src/index.js, ./node_modules/node-fetch/src/headers.js
* node:https in ./node_modules/node-fetch/src/index.js
* node:net in ./node_modules/node-fetch/src/utils/referrer.js
* node:stream in ./node_modules/node-fetch/src/index.js, ./node_modules/node-fetch/src/body.js
* node:url in ./node_modules/node-fetch/src/request.js
* node:util in ./node_modules/node-fetch/src/body.js, ./node_modules/node-fetch/src/headers.js and 1 other
* node:zlib in ./node_modules/node-fetch/src/index.js
To install them, you can run: npm install --save node:buffer node:http node:https node:net node:stream node:url node:util node:zlib
我尝试 run npm install --save node:buffer node:http node:https node:net node:stream node:url node:util node:zlib
但出现此错误:
npm ERR! code EUNSUPPORTEDPROTOCOL npm ERR! Unsupported URL Type "node:": node:buffer
如何安装缺少的依赖项?
(我在 UBUNTU 18.04.6 LTS 上使用 NODE JS v16.13.2)
运行 这个命令没有 (node:):
npm install --save buffer http https net stream url util zlib