0

I've been following along with a web dev tutorial and I'm stuck at this part: https://btholt.github.io/intro-to-web-dev-v2/libraries#building-your-code

I've been trying for a couple of days to install parcel-bundler and can't figure out what I'm doing wrong. I also tried Prettier and get the same errors. I'm so frustrated and running out of ideas.

I'm running npm 6.14.4 and node 12.16.2.

This is the error npm install -g parcel-bundler in Users/myName (Catalina 10.15):

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 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
/Users/myName/.node_modules_global/bin/parcel -> /Users/myName/.node_modules_global/lib/node_modules/parcel-bundler/bin/cli.js

> parcel-bundler@1.12.4 postinstall /Users/myName/.node_modules_global/lib/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')"

Love Parcel? You can now donate to our open collective:
 > https://opencollective.com/parcel/donate
+ parcel-bundler@1.12.4
updated 1 package in 18.055s

And if I try to run parcel --help I'm told: -bash: parcel: command not found

So I try to fix that first warning. I list the links to the SO articles that I tried at the bottom. I tried deleting node_modules in home directory and doing npm install again. I tried npm install --save core-js@^3. I tried doing a forced clean cache and reinstalling. I tried npm update.

This is my package.json:

{
  "name": "generic_package",  <-- manually changed from myName
  "version": "1.0.0",
  "description": "Test description", <-- manually added to remove "no description" error
  "main": ".mongorc.js",
  "dependencies": {
    "core-js": "^3.6.5",     <-- looks like it's using >3v
    "lodash": "^4.17.15",
    "parcel-bundler": "^1.12.4",  <-- looks like it's there??
    "prettier": "^2.0.4"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "node build/build.js" <-- manually added as per an SO article
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "repository": { <-- manually added this object as per an SO article
    "type": "git",
    "url": "https://github.com/npm/npm.git",
    "private": true <-- manually added as per another SO article
  }
}

Error: Please, upgrade your dependencies to the actual version of core-js@3

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

npm WARN deprecated core-js@2.6.11

How to update core-js to core-js@3 dependency? Problems installing express using npm.

coddswaddle
  • 13
  • 1
  • 7

1 Answers1

1

The reason for the message npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained is because parcel-bundler has a transitive dependency on core-js@2.6.11, which is no longer supported.

It appears that parcel was installed correctly, so you should be able to run it. On Linux systems, it would have created a symlink under /usr/local/bin/parcel. Make sure that "/usr/local/bin" is in your PATH.

You can also run it as follows:

npm run-script parcel

On newer versions of NPM, you can run this:

npx parcel
Aaron Evans
  • 226
  • 2
  • 5