Step 1.

You can install it using YARN or NPM

Yarn:

yarn global add parcel-bundler

npm:

npm install -g parcel-bundler

If you don’t want to install globally

yarn add parcel-bundler --dev
npm install parcel-bundler --save-dev
Copy the code

Command line to run the package

NPX parcel index.html // Recommended wayCopy the code

2. Little problems with packing errors

No entres found error

Solution:

/node_modules/.bin/parcel index. HTML NPX parcel NPX parcel index. HTML./node_modules/.bin/parcel index. HTMLCopy the code

Or global

npm i -g parcel
parcel index.html --no-cache
Copy the code

When used with Vue

// Add it to your project's package.json
{
 // ...
 "alias": {
   "vue" : "./node_modules/vue/dist/vue.common.js"}}Copy the code

If NPM fails, use YARN.