如何解决我无法使用npm安装包裹
我正在尝试使用以下方式安装包裹
npm install -g parcel-bundler
它会显示
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please,upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package,see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
C:\Users\Atrur\AppData\Roaming\npm\parcel -> C:\Users\Atrur\AppData\Roaming\npm\node_modules\parcel-bundler\bin\cli.js
> parcel-bundler@1.12.4 postinstall C:\Users\Atrur\AppData\Roaming\npm\node_modules\parcel-bundler
> node -e "console.log('\u001b[35m\u001b[1mLove Parcel? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/parcel/donate\u001b[0m')"
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\parcel-bundler\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ parcel-bundler@1.12.4
updated 1 package in 37.266s
我尝试过
npm install --save core-js@^3
但这没有帮助
这是package.json
{
"name": "saas","version": "1.0.0","main": "index.js","scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},"author": "","license": "ISC","dependencies": {
"core-js": "^3.6.5","lodash": "^4.17.19"
},"devDependencies": {},"keywords": [],"description": ""
}
我是npm的新手,所以我不知道如何解决此错误 如果您能帮助我,我会尽一切努力
解决方法
您正在使用NPM's global flag:-g
安装Parcel,它将在全球进行安装,以便您可以从任何地方访问该软件包。
要安装到本地目录或项目中,只需删除标志:
npm install parcel-bundler
在安装软件包时,其依赖项也会自动安装,因此您不必手动添加它们。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。