The parcel running terminal reports an error Uncaught ReferenceError: parcelRequire is not defined solution

we pass the instruction

npm install parcel-bundler

There will be an error when the installed parcel runs,
insert image description here
just change the version

Open the project terminal,
let's execute first

npm uninstall parcel-bundler

Give him the wrong version
and execute

npm install parcel

Install the correct version

Then run the project
insert image description here
and access the address in the browser, everything is normal
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45966674/article/details/131473653
Recommended