Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"npm run dev" does not load build.js or loads a stale one #48

Open
appurist opened this issue Sep 10, 2017 · 0 comments
Open

"npm run dev" does not load build.js or loads a stale one #48

appurist opened this issue Sep 10, 2017 · 0 comments

Comments

@appurist
Copy link

appurist commented Sep 10, 2017

If I do a:
vue init browserify blah
and then:

cd blah
npm i
npm run dev

I get a blank white screen on the browser. This is due to the 404 on build.js (and a 404 on build.css which does not get resolved even on a Refresh). A manual browser refresh finds the build.js and loads the page normally.

This seems to either be due to a race condition between the two parallel tasks of the dev script. or watchify or HMR does not recognizing that build.js was created to trigger it to (re)load. The build.js output file just hasn't been produced yet by the time the browser tries to load it.

The result is that npm run dev produces a blank screen after just running a default vue init browserify. Only the first time.

But I think this also means that if you do another npm run dev later, you're getting the old (stale) build.js on the first page display for that npm run dev session.

I'm not sure where the problem is here exactly. I think it's really just a problem with the dev build process running in parallel when the browser opens.

npm run dev

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

No branches or pull requests

1 participant