After successfully installing Parcel using npm, I created a package.json file with the following content:
{
"name": "example",
"version": "0.1.0",
"source": "src/index.js",
"main": "dist/index.js",
"scripts": {
"build": "parcel build"
},
"devDependencies": {
"parcel": "^2.0.1"
}
}
Despite following the instructions on the website, running npm run build
results in the message:
Debugger attached. Waiting for the debugger to disconnect...
The command prompt returns without creating or modifying any files. Additionally, the terminal doesn't recognize the parcel
command. Reinstalling Parcel did not resolve this issue.
I managed to achieve some progress by using npx parcel build src/index.js
, although the behavior seemed peculiar. It appeared to reinstall Parcel and left behind a .parcel-cache folder in my directory. The output JS file had its global variable replaced with a string of numbers as the name. Moreover, after running the npx command, the terminal becomes unresponsive. Is this normal?