Code Monkey home page Code Monkey logo

Comments (10)

LasaleFamine avatar LasaleFamine commented on June 11, 2024

Hey @DanielRuf, can you please give us more details?
Are you getting the error for both commands?
Are you checking the correct browsers when running the commands? (check out the readme for more details)
Did you make any changes or it is a fresh copy of the skeleton?

I can't help without this kind of details.
Thanks!

from polymer-skeleton.

DanielRuf avatar DanielRuf commented on June 11, 2024

I am using Chrome 60 on Windows.
Both scripts throw this error.

It was a fresh copy.

Fresh dev in incognito mode:

(index):90 GET http://localhost:3000/module.bundle.js net::ERR_ABORTED
componentsReady @ (index):90
(anonymous) @ webcomponents-loader.js:61
requestAnimationFrame (async)
fire @ webcomponents-loader.js:59
(anonymous) @ webcomponents-loader.js:66
(anonymous) @ webcomponents-loader.js:74
A bad HTTP response code (404) was received when fetching the script.
:3000/sw.js Failed to load resource: net::ERR_INVALID_RESPONSE
(index):71 Error during service worker registration: TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.

Fresh dev:module works but throws

(index):71 Error during service worker registration: TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.

But is also very fragile when adding other webpack plugins eg for svg spritesheets.

I am using Windows 10 with Node 8 and npm 5.

from polymer-skeleton.

DanielRuf avatar DanielRuf commented on June 11, 2024

The requirement of the service workers does not make it easier for local testing.

from polymer-skeleton.

DanielRuf avatar DanielRuf commented on June 11, 2024

Also see https://github.com/DanielRuf/polymer-skeleton-svgsprites

from polymer-skeleton.

LasaleFamine avatar LasaleFamine commented on June 11, 2024

I am using Chrome 60 on Windows.

For developing on Chrome you need to run dev:module. As you said it works, and service workers are not generated for development with the current configuration, so it's simply a "not found" error that you won't have with a production build.
Anyway you can easily fix this 404 generating the service worker also for development or with better check before trying to register the workers (eg. an initialization script bundled with Webpack where you can check for the process.env.NODE_ENV variable).

But is also very fragile when adding other webpack plugins eg for svg spritesheets.

Do you have any specific error?

Anyway I would prefer a PostCSS plugin for working with SVG.

Maybe @equinusocio can help?

@DanielRuf if you don't have any other problem for loading the app with the dev and dev:module command please rename the issue so we can focus on the sprite plugin problem.

from polymer-skeleton.

DanielRuf avatar DanielRuf commented on June 11, 2024

No, in the normal dev mode the site still shows loading.

from polymer-skeleton.

LasaleFamine avatar LasaleFamine commented on June 11, 2024

For the "dev" command you should use a no-module browser like FireFox. Please check out the Readme for more details.

from polymer-skeleton.

DanielRuf avatar DanielRuf commented on June 11, 2024

Ok, then we just have the svgsprite issue left.

from polymer-skeleton.

LasaleFamine avatar LasaleFamine commented on June 11, 2024

Hey @DanielRuf, did you find a solution for your problem? I have updated Webpack, maybe now you can double check if this is still a problem. I'm closing for now, feel free to reopen!

from polymer-skeleton.

DanielRuf avatar DanielRuf commented on June 11, 2024

Will try to check then.

We stopped evaluating Polymer further as it introduced more issues compared to our React solutions.

from polymer-skeleton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.