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

unable to run the project in production mode. #170

Open
rassemdev opened this issue Mar 20, 2018 · 4 comments
Open

unable to run the project in production mode. #170

rassemdev opened this issue Mar 20, 2018 · 4 comments

Comments

@rassemdev
Copy link

I'm having this problem while running in production mode. After running those command
vue init pwa my-project
cd my-project
npm install
Then I used npm run build and then locate to http://localhost/my-project/dist .. but nothing is showing. Can anyone help how to run the project in production mode.

@niutech
Copy link

niutech commented Mar 22, 2018

Can you view the source? You should see the contents of index.html.
What do you see in the web console?

@tvld
Copy link

tvld commented Apr 5, 2018

If I am not mistaken, in production mode you can not load from a folder. You do need a webserver such as nginx or some node express to serve your pages. (FireFox is a bit more foregiving with loading for a folder, but still webserver is needed)

@Oluwatemilorun
Copy link

I'm having this same issue, even after publishing to an Apache server. Files are loading correctly when viewing the network, but a blank page is just shown. Please help.

@rassemdev
Copy link
Author

After production build, and open up my console and saw scripts are not found. So i edited index.html file. I edited all script src location <script src="/scriptName.js"> to <script src="scriptName.js">. And it solved my problem.

Note: as everything was building in "yourport/dist" folder i edited index.html which was located inside dist folder

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

4 participants