Meteor create --svelte is using an old svelte version

If you are creating a new svelte app right now, you will get this message the first time you run it:

While building for web.browser.legacy:
   imports/ui/App.svelte: Unrecognized option 'sourcemap'
   
=> Your application has errors. Waiting for file change.

To fix it go to package.json and change the svelte version from 3.27.0 to 3.46.4
In the terminal run $ meteor npm install
That’s it.

Where do I report this bug?

Hey @lluis, the way to report is to open an issue in our Github.

Which Meteor version are you using? This issue was fixed a few days ago and released on Meteor 2.6.1. You can see the closed issue here.

I’m at Meteor 2.6

When I created the project, and it didn’t work, the first thing I did is:

$ meteor update

This project is already at Meteor 2.6, the latest release.
Your top-level dependencies are at their latest compatible versions.

Can you please run meteor update --release 2.6.1. The last recommended version is still 2.6, but we already have another one with new updates and fixes.

I tested with a new project and it doesn’t work. svelte is still at 3.27.0

$ meteor create --svelte test
Created a new Meteor app in ‘test’.
To run your new app:
cd test
meteor

$ cd test
$ meteor
=> Started proxy.
=> Started HMR server.
=> Errors prevented startup:
While building for web.browser:
imports/ui/App.svelte: Unrecognized option ‘sourcemap’
=> Your application has errors. Waiting for file change.
=> Started MongoDB.

$ meteor update --release 2.6.1
test: updated to Meteor 2.6.1.

$ meteor
=> Started proxy.
=> Started HMR server.
=> Errors prevented startup:
While building for web.browser:
imports/ui/App.svelte: Unrecognized option ‘sourcemap’
=> Your application has errors. Waiting for file change.
=> Started MongoDB.

1 Like

For documentation’s sake, I am actually having the same issue right now.

I published an update to zodern:melte to fix it crashing with old svelte versions. New apps created with meteor create --svelte will use the new version.

2 Likes