Git Product home page Git Product logo

Comments (8)

lukeed avatar lukeed commented on September 25, 2024 1

You can't start without running build first.

You are seeing HTML inside your bundle.js because:

  1. the bundle.js hasn't been built yet; and
  2. the sirv command is run with --single flag, which redirects all 404/missing files to index.html

This is why you see the public/index.html contents.

The dev command works for you because it starts the server and builds the files at the same time for you.

from template.

bravebox avatar bravebox commented on September 25, 2024

I have the same issue.

Windows / Node version v10.7.0

EDIT: Tried it on my Mac and it works. Thanks @lukeed

from template.

lukeed avatar lukeed commented on September 25, 2024

Cannot reproduce with clean template clone:

git clone [email protected]:sveltejs/template.git svelte-template
cd svelte-template
yarn
yarn build
yarn start
//=> No errors on localhost:5000

rm -rf public
git reset --hard
yarn dev
//=> No errors on localhost:5000

Please provide steps if it's possible to see with the base template.

from template.

frederikhors avatar frederikhors commented on September 25, 2024

It works good to me on Windows.

from template.

flihub avatar flihub commented on September 25, 2024

tried again same error and bundle.js contains html code build not happend maybe someone suggest something.

node -v : v10.16.0 -- tried previous builds same error

Capture

from template.

Conduitry avatar Conduitry commented on September 25, 2024

Are there any errors in your terminal? Does public actually contain a bundle.js? What happens when you run npm run build?

from template.

flihub avatar flihub commented on September 25, 2024

i tried always npm run start before upside errors.

build/autobuild/dev = worked // no errors

i found that sirv not working after start and start:dev command localhost:5000 opened but not working.

after npm run dev open my svelte public url build success, livereload working

Capture

from template.

flihub avatar flihub commented on September 25, 2024

thx.

from template.

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.