sapper icon indicating copy to clipboard operation
sapper copied to clipboard

Getting Script Error when I refresh

Open keepitsane opened this issue 7 years ago • 6 comments

Can't seem to get to the bottom of this issue or even find a way to get an idea what is causing the error.

Here is the error message that I am receiving

Navigated to http://localhost:3000/
VM255 sapper-dev-client.89e34bae.js:21 [SAPPER] dev client connected
VM255 sapper-dev-client.89e34bae.js:25 Event {isTrusted: true, type: "error", target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
source.onerror @ VM255 sapper-dev-client.89e34bae.js:25

keepitsane avatar Nov 07 '19 01:11 keepitsane

The same, it is present at lest for a week.

I have tried the fresh install to verify and it is present there as well.

peterbabic avatar Nov 08 '19 09:11 peterbabic

It's probably the livereload websocket being interrupted. You may ignore it. It's only present in dev.

Try this:

  1. open a new tab
  2. open devtools
  3. open http://localhost:3000/ in the tab that was just opened

Notice there is no error.

thgh avatar Nov 09 '19 18:11 thgh

This should no longer be happening in 0.27.14.

Conduitry avatar Jun 09 '20 15:06 Conduitry

@Conduitry bumping sapper version to 0.27.15 fixed it for me. Thanks!

p-adams avatar Jun 13 '20 21:06 p-adams

This should no longer be happening in 0.27.14.

Hello!! I am having this problem when I run my project with sapper 0.27.16 through a docker container.

sapper-dev-client.js:25 Event {isTrusted: true, type: "error", target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
source.onerror @ sapper-dev-client.js:25
error (async)
connect @ sapper-dev-client.js:24
(anonymous) @ manifest-client.mjs:90
Promise.then (async)
(anonymous) @ manifest-client.mjs:89
:10000/__sapper__:1 GET http://localhost:10000/__sapper__ net::ERR_CONNECTION_REFUSED

At the moment it does not interfere with development, but I do not think it is the most successful and I do not get the correct way to solve it

yeraldev avatar Jul 09 '20 06:07 yeraldev

I had this issue today on version 0.27.16 and I found it out to be an issue with my run scripts in package.json.

Here was what I had:

"scripts": {
    ...,
    "dev": "run-p watch:tailwind && sapper dev",
    ...
}

Note: run-p is from npm-run-all package.

This is a wrong config for npm-run-all and I updated it to be as following:

"scripts": {
    ...,
    "sapper:dev": "sapper dev",
    "dev": "run-p watch:tailwind sapper:dev",
    ...
}

This change resolved my issue. If you are still seeing the same issue, it's worth a quick check.

rockia avatar Aug 07 '20 08:08 rockia