sveltejs/template

Degit template project does not run with Chrome

martinblostein opened this issue · 1 comments

Describe the bug
When I follow the installation instructions and on the front page of svelte.dev, Chrome chokes when trying to display the app running in either via npm run dev or npm start. Both work in Firefox.

Logs
Browser console reads only:

Uncaught SyntaxError: Unexpected token '<' (in index.js)

Looking into the Sources tab in Chrome dev tools, there are 4 files under localhost:5000:

  • (index): as expected
  • global.css: as expected
  • build/bundle.js: identical to (index) (not a JS file...)
  • build/bundle.css: identical to (index) (not a CSS file...)

The build/bundle.js being HTML explains the error, at least.

The actual public/build directory show what I would expect, and Firefox agrees.

To Reproduce

npx degit sveltejs/template my-svelte-project
cd my-svelte-project

npm install
npm run dev

Open localhost:5000 in Chrome.

Expected behavior
The template project will run in Chrome just as how it does in Firefox.

Information about your Svelte project:

  • Chrome Version 78.0.3904.97 (Official Build) (64-bit) [Does not work]

  • FIrefox 70.0.1 (64-bit) [Works]

  • Operating System: Linux Mint 19.2

  • Svelte version: 3.14.1 (as from template)

  • Using rollup

Severity
I think this is quite severe as it could dissuade a potential new user of svelte before they even install. However, it may be caused only by Chrome or my local environment and thus not very widely spread.

Ugh, this is embarassing but I finally did a hard refresh on Chrome and it is working. Chalk this up to a browser cache problem / user error.