Server returns 404 on assets for PWA with vuecaching app shell in a React PWA with Server-Side renderingFailed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the scriptHow can I include a service worker js file from src/ directory in index.html Angular 2What does Progressive means in the PWA (Progressive web app)Next.js PWA (Service Worker + Manifest.json)Add to home screen banner prompt not coming while fetching web manifest from server and then setting path of that inside index.htmlAngular 7 Service Worker not Working Offline when using Node.Js ServerAngular PWA: Site cannot be installed: no matching service worker detectedAngular PWA not working offline on safari and old browserReact PWA : How to properly setup the manifest file and register service worker
Is there any reason to concentrate on the Thunderous Smite spell after using its effects?
Is Schwarzschild's solution in his original paper consistent with current solutions?
What was the motivation for the invention of electric pianos?
Asked to Not Use Transactions and to Use A Workaround to Simulate One
What next step can I take in solving this sudoku?
Is using gradient descent for MIP a good idea?
Does a succubus' charm end when it dies?
Why don't airports use arresting gears to recover energy from landing passenger planes?
How do we know that black holes are spinning?
Why is the year in this ISO timestamp not 2019?
Parallel resistance in electric circuits
Has SHA256 been broken by Treadwell Stanton DuPont?
How are aircraft depainted?
What made 4/4 time the most common time signature?
In what state are satellites left in when they are left in a graveyard orbit?
Would it be unbalanced to increase Wild Shape uses based on level?
Why is my fire extinguisher emptied after one use?
Why are some files not movable on Windows 10?
Ambiguity in notation resolved by +
In what sequence should an advanced civilization teach technology to medieval society to maximize rate of adoption?
How do certain apps show new notifications when internet access is restricted to them?
Amortized Loans seem to benefit the bank more than the customer
What jurisdiction do Scottish courts have over the Westminster parliament?
How do I create indestructible terrain?
Server returns 404 on assets for PWA with vue
caching app shell in a React PWA with Server-Side renderingFailed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the scriptHow can I include a service worker js file from src/ directory in index.html Angular 2What does Progressive means in the PWA (Progressive web app)Next.js PWA (Service Worker + Manifest.json)Add to home screen banner prompt not coming while fetching web manifest from server and then setting path of that inside index.htmlAngular 7 Service Worker not Working Offline when using Node.Js ServerAngular PWA: Site cannot be installed: no matching service worker detectedAngular PWA not working offline on safari and old browserReact PWA : How to properly setup the manifest file and register service worker
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I run NPM build on the PWA boilerplate I am using.
Folder structure on server is as follows:
my-project ->
static,
index.html,
service-worker
I have then hosted on server and the Manifest and assets are returning a 404.
The project is currently here.
https://evilernie44.github.io/my-project/
Any help is much appreciated.
Changing routes on the manifest and two different servers
I want to get a boiler-plate hosted as a starting point for my PWA
github vue.js service-worker progressive-web-apps
add a comment
|
I run NPM build on the PWA boilerplate I am using.
Folder structure on server is as follows:
my-project ->
static,
index.html,
service-worker
I have then hosted on server and the Manifest and assets are returning a 404.
The project is currently here.
https://evilernie44.github.io/my-project/
Any help is much appreciated.
Changing routes on the manifest and two different servers
I want to get a boiler-plate hosted as a starting point for my PWA
github vue.js service-worker progressive-web-apps
add a comment
|
I run NPM build on the PWA boilerplate I am using.
Folder structure on server is as follows:
my-project ->
static,
index.html,
service-worker
I have then hosted on server and the Manifest and assets are returning a 404.
The project is currently here.
https://evilernie44.github.io/my-project/
Any help is much appreciated.
Changing routes on the manifest and two different servers
I want to get a boiler-plate hosted as a starting point for my PWA
github vue.js service-worker progressive-web-apps
I run NPM build on the PWA boilerplate I am using.
Folder structure on server is as follows:
my-project ->
static,
index.html,
service-worker
I have then hosted on server and the Manifest and assets are returning a 404.
The project is currently here.
https://evilernie44.github.io/my-project/
Any help is much appreciated.
Changing routes on the manifest and two different servers
I want to get a boiler-plate hosted as a starting point for my PWA
github vue.js service-worker progressive-web-apps
github vue.js service-worker progressive-web-apps
edited Mar 28 at 11:33
Varit J Patel
2,3391 gold badge9 silver badges18 bronze badges
2,3391 gold badge9 silver badges18 bronze badges
asked Mar 28 at 10:54
Simon DeanSimon Dean
801 silver badge9 bronze badges
801 silver badge9 bronze badges
add a comment
|
add a comment
|
1 Answer
1
active
oldest
votes
Your script tags point to the wrong path.
Take this tag for example:
<script type=text/javascript src=/static/js/app.98f21a65b373eaa50022.js></script>
The browser resolves it to https://evilernie44.github.io/static/js/app.98f21a65b373eaa50022.js, which does not exist.
The correct path should be ./static/js/app.98f21a65b373eaa50022.js. The extra dot instructs the browser to build the full url relative to the current path.
Alternatively, you can specify an absolute path, such as /my-project/static/js/app.98f21a65b373eaa50022.js which points to the correct location.
In conclusion, any of the following 2 script tags would work:
<script type=text/javascript src=./static/js/app.98f21a65b373eaa50022.js></script>
<script type=text/javascript src=/my-project/static/js/app.98f21a65b373eaa50022.js></script>
Thanks, ill try that now. Im really confused as to why when you build the app this is not done automatically. Am I just expecting too much>?#
– Simon Dean
Mar 28 at 13:26
Perhaps vue is not aware of github hosting your app on a subdirectory
– jro
Mar 28 at 13:38
Maybe, I have tried this suggestion. Just to clarify you mean amend the script at the bottom of the index.html? Also, would I need to rebuild it and then redeploy or should I be able to just change the script tag?
– Simon Dean
Mar 28 at 14:21
Will the rest of the paths also need to be amended also manifest.json ect?
– Simon Dean
Mar 28 at 14:37
Yes, all the paths will have to be changed in index.html. I'm not sure how github pages work, but it'll probably autoupdate when you commit and push
– jro
Mar 29 at 5:19
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55395797%2fserver-returns-404-on-assets-for-pwa-with-vue%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your script tags point to the wrong path.
Take this tag for example:
<script type=text/javascript src=/static/js/app.98f21a65b373eaa50022.js></script>
The browser resolves it to https://evilernie44.github.io/static/js/app.98f21a65b373eaa50022.js, which does not exist.
The correct path should be ./static/js/app.98f21a65b373eaa50022.js. The extra dot instructs the browser to build the full url relative to the current path.
Alternatively, you can specify an absolute path, such as /my-project/static/js/app.98f21a65b373eaa50022.js which points to the correct location.
In conclusion, any of the following 2 script tags would work:
<script type=text/javascript src=./static/js/app.98f21a65b373eaa50022.js></script>
<script type=text/javascript src=/my-project/static/js/app.98f21a65b373eaa50022.js></script>
Thanks, ill try that now. Im really confused as to why when you build the app this is not done automatically. Am I just expecting too much>?#
– Simon Dean
Mar 28 at 13:26
Perhaps vue is not aware of github hosting your app on a subdirectory
– jro
Mar 28 at 13:38
Maybe, I have tried this suggestion. Just to clarify you mean amend the script at the bottom of the index.html? Also, would I need to rebuild it and then redeploy or should I be able to just change the script tag?
– Simon Dean
Mar 28 at 14:21
Will the rest of the paths also need to be amended also manifest.json ect?
– Simon Dean
Mar 28 at 14:37
Yes, all the paths will have to be changed in index.html. I'm not sure how github pages work, but it'll probably autoupdate when you commit and push
– jro
Mar 29 at 5:19
add a comment
|
Your script tags point to the wrong path.
Take this tag for example:
<script type=text/javascript src=/static/js/app.98f21a65b373eaa50022.js></script>
The browser resolves it to https://evilernie44.github.io/static/js/app.98f21a65b373eaa50022.js, which does not exist.
The correct path should be ./static/js/app.98f21a65b373eaa50022.js. The extra dot instructs the browser to build the full url relative to the current path.
Alternatively, you can specify an absolute path, such as /my-project/static/js/app.98f21a65b373eaa50022.js which points to the correct location.
In conclusion, any of the following 2 script tags would work:
<script type=text/javascript src=./static/js/app.98f21a65b373eaa50022.js></script>
<script type=text/javascript src=/my-project/static/js/app.98f21a65b373eaa50022.js></script>
Thanks, ill try that now. Im really confused as to why when you build the app this is not done automatically. Am I just expecting too much>?#
– Simon Dean
Mar 28 at 13:26
Perhaps vue is not aware of github hosting your app on a subdirectory
– jro
Mar 28 at 13:38
Maybe, I have tried this suggestion. Just to clarify you mean amend the script at the bottom of the index.html? Also, would I need to rebuild it and then redeploy or should I be able to just change the script tag?
– Simon Dean
Mar 28 at 14:21
Will the rest of the paths also need to be amended also manifest.json ect?
– Simon Dean
Mar 28 at 14:37
Yes, all the paths will have to be changed in index.html. I'm not sure how github pages work, but it'll probably autoupdate when you commit and push
– jro
Mar 29 at 5:19
add a comment
|
Your script tags point to the wrong path.
Take this tag for example:
<script type=text/javascript src=/static/js/app.98f21a65b373eaa50022.js></script>
The browser resolves it to https://evilernie44.github.io/static/js/app.98f21a65b373eaa50022.js, which does not exist.
The correct path should be ./static/js/app.98f21a65b373eaa50022.js. The extra dot instructs the browser to build the full url relative to the current path.
Alternatively, you can specify an absolute path, such as /my-project/static/js/app.98f21a65b373eaa50022.js which points to the correct location.
In conclusion, any of the following 2 script tags would work:
<script type=text/javascript src=./static/js/app.98f21a65b373eaa50022.js></script>
<script type=text/javascript src=/my-project/static/js/app.98f21a65b373eaa50022.js></script>
Your script tags point to the wrong path.
Take this tag for example:
<script type=text/javascript src=/static/js/app.98f21a65b373eaa50022.js></script>
The browser resolves it to https://evilernie44.github.io/static/js/app.98f21a65b373eaa50022.js, which does not exist.
The correct path should be ./static/js/app.98f21a65b373eaa50022.js. The extra dot instructs the browser to build the full url relative to the current path.
Alternatively, you can specify an absolute path, such as /my-project/static/js/app.98f21a65b373eaa50022.js which points to the correct location.
In conclusion, any of the following 2 script tags would work:
<script type=text/javascript src=./static/js/app.98f21a65b373eaa50022.js></script>
<script type=text/javascript src=/my-project/static/js/app.98f21a65b373eaa50022.js></script>
answered Mar 28 at 12:32
jrojro
7161 gold badge3 silver badges16 bronze badges
7161 gold badge3 silver badges16 bronze badges
Thanks, ill try that now. Im really confused as to why when you build the app this is not done automatically. Am I just expecting too much>?#
– Simon Dean
Mar 28 at 13:26
Perhaps vue is not aware of github hosting your app on a subdirectory
– jro
Mar 28 at 13:38
Maybe, I have tried this suggestion. Just to clarify you mean amend the script at the bottom of the index.html? Also, would I need to rebuild it and then redeploy or should I be able to just change the script tag?
– Simon Dean
Mar 28 at 14:21
Will the rest of the paths also need to be amended also manifest.json ect?
– Simon Dean
Mar 28 at 14:37
Yes, all the paths will have to be changed in index.html. I'm not sure how github pages work, but it'll probably autoupdate when you commit and push
– jro
Mar 29 at 5:19
add a comment
|
Thanks, ill try that now. Im really confused as to why when you build the app this is not done automatically. Am I just expecting too much>?#
– Simon Dean
Mar 28 at 13:26
Perhaps vue is not aware of github hosting your app on a subdirectory
– jro
Mar 28 at 13:38
Maybe, I have tried this suggestion. Just to clarify you mean amend the script at the bottom of the index.html? Also, would I need to rebuild it and then redeploy or should I be able to just change the script tag?
– Simon Dean
Mar 28 at 14:21
Will the rest of the paths also need to be amended also manifest.json ect?
– Simon Dean
Mar 28 at 14:37
Yes, all the paths will have to be changed in index.html. I'm not sure how github pages work, but it'll probably autoupdate when you commit and push
– jro
Mar 29 at 5:19
Thanks, ill try that now. Im really confused as to why when you build the app this is not done automatically. Am I just expecting too much>?#
– Simon Dean
Mar 28 at 13:26
Thanks, ill try that now. Im really confused as to why when you build the app this is not done automatically. Am I just expecting too much>?#
– Simon Dean
Mar 28 at 13:26
Perhaps vue is not aware of github hosting your app on a subdirectory
– jro
Mar 28 at 13:38
Perhaps vue is not aware of github hosting your app on a subdirectory
– jro
Mar 28 at 13:38
Maybe, I have tried this suggestion. Just to clarify you mean amend the script at the bottom of the index.html? Also, would I need to rebuild it and then redeploy or should I be able to just change the script tag?
– Simon Dean
Mar 28 at 14:21
Maybe, I have tried this suggestion. Just to clarify you mean amend the script at the bottom of the index.html? Also, would I need to rebuild it and then redeploy or should I be able to just change the script tag?
– Simon Dean
Mar 28 at 14:21
Will the rest of the paths also need to be amended also manifest.json ect?
– Simon Dean
Mar 28 at 14:37
Will the rest of the paths also need to be amended also manifest.json ect?
– Simon Dean
Mar 28 at 14:37
Yes, all the paths will have to be changed in index.html. I'm not sure how github pages work, but it'll probably autoupdate when you commit and push
– jro
Mar 29 at 5:19
Yes, all the paths will have to be changed in index.html. I'm not sure how github pages work, but it'll probably autoupdate when you commit and push
– jro
Mar 29 at 5:19
add a comment
|
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55395797%2fserver-returns-404-on-assets-for-pwa-with-vue%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown