p2pcf icon indicating copy to clipboard operation
p2pcf copied to clipboard

Vite complains

Open silenceofthewans opened this issue 3 years ago • 1 comments

Screenshot (200)

silenceofthewans avatar Mar 05 '23 04:03 silenceofthewans

I'll add that I get the following error when building a Svelte app with p2pcf

Screen Shot 2023-03-26 at 4 35 33 PM

Which leads me to this StackOverflow article, which says:

Update For Node.js / NPM Add "type": "module" to your package.json file.

{
  // ...
  "type": "module",
  // ...
}

Note: When using modules, if you get ReferenceError: require is not defined, you'll need to use the import syntax instead of require. You can't natively mix and match between them, so you'll need to pick one or use a bundler if you need to use both.

jonathanhawleypeters avatar Mar 26 '23 23:03 jonathanhawleypeters