Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Starter Svelte App #3873

Closed
mattdesl opened this issue Nov 7, 2019 · 1 comment
Closed

Error on Starter Svelte App #3873

mattdesl opened this issue Nov 7, 2019 · 1 comment

Comments

@mattdesl
Copy link

mattdesl commented Nov 7, 2019

Describe the bug

I just tried a simple svelte app (copying code from this folder) and it gives an error:

css-loader.js:30 Uncaught TypeError: Class constructor SvelteComponentDev cannot be invoked without 'new'

I am using parcel-bundler and parcel-plugin-svelte.

To Reproduce

npm init -y
npm i svelte parcel-bundler parcel-plugin-svelte

Then add the 3 source files from the earlier linked folder, and:

npx parcel index.html

Steps to Fix

To fix it you just need this in your package.json, which is not obvious and makes me think its a bug:

  ...
  "browserslist": [
    "last 1 chrome versions"
  ]
  ...

Versions

"devDependencies": {
    "parcel-bundler": "^1.12.4",
    "parcel-plugin-svelte": "^4.0.4",
    "svelte": "^3.12.1"
}
@Conduitry
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants