Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Getting Script Error when I refresh #981

Closed
keepitsane opened this issue Nov 7, 2019 · 6 comments
Closed

Getting Script Error when I refresh #981

keepitsane opened this issue Nov 7, 2019 · 6 comments

Comments

@keepitsane
Copy link

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
@peterbabic
Copy link

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.

@thgh
Copy link
Contributor

thgh commented Nov 9, 2019

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.

@Conduitry
Copy link
Member

This should no longer be happening in 0.27.14.

@p-adams
Copy link

p-adams commented Jun 13, 2020

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

@yeraldev
Copy link

yeraldev commented Jul 9, 2020

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

@rockia
Copy link
Contributor

rockia commented Aug 7, 2020

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.

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

No branches or pull requests

7 participants