1

我是 Bubblewrap 的新手。我下载了 Node.js,然后下载了npm i -g @bubblewrap/cli. 它抛出了一些警告,但它确实完成了。

在此之后,当我在做的时候bubblewrap init --manifest https://beegle.app/bpro-manifest.json,我遇到了一些我不理解且不知道如何解决的错误。

以下是错误消息:

[Mukeshs-MacBook-Air:beeglepro-bubblewrap mghatiya$ bubblewrap init --manifest https://beegle.app/bpro-manifest.json
internal/util.js:206
    throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    at promisify (internal/util.js:206:11)
    at Object.<anonymous> (/Users/mghatiya/.nvm/versions/node/v8.9.3/lib/node_modules/@bubblewrap/cli/node_modules/get-stream/index.js:7:35)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/mghatiya/.nvm/versions/node/v8.9.3/lib/node_modules/@bubblewrap/cli/node_modules/fetch-h2/dist/lib/body.js:6:22)

出了什么问题?

4

2 回答 2

1

看起来我安装了旧版本的 Node.js,无论出于何种原因,即使我刚刚从网站下载了 Node.js,但最新的没有加载,或者没有加载到正确的位置等等。

所以基本上发出的警告npm i -g @bubblewrap/cli确实是强烈的警告,它还没有完成它的工作。

我升级到最新的 Node.js 版本,nvm install node --reinstall-packages-from=node现在我发布的错误已经在bubblewrap init行动中消失了。

当然,与所有开发事物一样,现在我面临新的错误和警告。

于 2021-10-03T20:29:08.007 回答
0

我在版本 8.16.2 (nvm) 中使用带有 npm 的 Windows。感谢@mukesh 指出这一点。在nvm listand之后nvm use 14.18.0,我重新安装了bubblewrap,这次bubblewrap init命令有效。

于 2021-12-10T18:24:28.337 回答