Comments (8)
You can't start
without running build
first.
You are seeing HTML inside your bundle.js
because:
- the
bundle.js
hasn't been built yet; and - the
sirv
command is run with--single
flag, which redirects all 404/missing files toindex.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.
I have the same issue.
Windows / Node version v10.7.0
EDIT: Tried it on my Mac and it works. Thanks @lukeed
from template.
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.
It works good to me on Windows.
from template.
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
from template.
Are there any errors in your terminal? Does public
actually contain a bundle.js
? What happens when you run npm run build
?
from template.
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
from template.
thx.
from template.
Related Issues (20)
- No app body on MacOS HOT 2
- Upgrade packages HOT 1
- `npm run dev` updates terminal quickly and repeatively when nothing is going HOT 2
- tsconfig error when cloning HOT 2
- Error when building: Unrecognized option enableSourcemap HOT 1
- Importing a module throws "Uncaught ReferenceError: exports is not defined" in browser
- could not find commit hash for HEAD HOT 1
- Svelte dev on https doesn't detect changes HOT 3
- Typescript support broken with TS 4.5, can't find type declarations HOT 6
- Consider adding dotenv and @rollup/plugin-replace HOT 1
- IIFE vs ES output format
- Sharing the Vite template I made based on the RollUp template HOT 3
- Mac user issues: Unexpected token and site can't be reached
- I have to save everytime after making changes HOT 1
- Hot update doesnt work with sveltejs/template
- compilerOptions wont effect build/dont apply
- SyntaxError: Cannot use import statement outside a module HOT 11
- Deprecate RollUP template in favor of Vite's for Svelte
- 【Feature Request】public directory customization should be set in one place
- Package css into js HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from template.