I installed Parcel with npm, everything installed fine without errors. I have a package.json like this:
{
"name": "example",
"version": "0.1.0",
"source": "src/index.js",
"main": "dist/index.js",
"scripts": {
"build": "parcel build"
},
"devDependencies": {
"parcel": "^2.0.1"
}
}
I'm just following the instructions on the website, but when I run npm run build
it just says:
Debugger attached. Waiting for the debugger to disconnect...
Then it goes back to the command prompt. No files are touched or created. And actually parcel
is not recognized as a command in the terminal. I tried uninstalling and re-installing Parcel but it still didn't work.
I did get some success with npx parcel build src/index.js
, but the behaviour seemed weird to me. It looked like it installed Parcel all over again and left a .parcel-cache folder in my directory. It did produce an output js but all it did to the js was change the one global variable to something with a long string of numbers in the name. I just want to minify js. After npx runs that command the terminal freezes. Is that normal?