简体   繁体   中英

I cant install parcel with npm

I am trying to install parcel using

   npm install -g parcel-bundler

and it displays

   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

I've tried

   npm install --save core-js@^3

But it doesnt help

Here is 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": ""
}

I am new to npm so I dont know how to fix this bug I've tried everything if you can help me I wuld be pleased

You are installing Parcel using NPM's global flag : -g which installs it globally so you can access the package from anywhere.

To install into a local directory or project, simply remove the flag:

npm install parcel-bundler

When installing a package, its dependencies are automatically installed, too, so you don't have to manually add them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM