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

fix(quasar-cli-vue3): fixed prod builds #3208

Merged
merged 10 commits into from
Nov 1, 2023

Conversation

lexasq
Copy link
Collaborator

@lexasq lexasq commented Oct 24, 2023

Fix for #3173

@vercel
Copy link

vercel bot commented Oct 24, 2023

@lexasq is attempting to deploy a commit to the Module Federation Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

Workflow status is failure ❌
Unfortunately test report wasn't generated, it can be if no workspaces changed. Please check the workflow run below.
Link to GitHub workflow: Github Workflow Link

@github-actions github-actions bot added the workflow-failure Workflow is failed label Oct 24, 2023
@github-actions
Copy link

Workflow status is failure ❌
Unfortunately test report wasn't generated, it can be if no workspaces changed. Please check the workflow run below.
Link to GitHub workflow: Github Workflow Link

const publicPath = `http://localhost:3001/`

const doubleSlashRE = /\/\//
const addPublicPath = url => (publicPath + url).replace(doubleSlashRE, '/')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just asking shall we use global replace/replace all occurrences here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's autogenerated folder

@github-actions
Copy link

Workflow status is failure ❌
Unfortunately test report wasn't generated, it can be if no workspaces changed. Please check the workflow run below.
Link to GitHub workflow: Github Workflow Link

@goldyfruit
Copy link

goldyfruit commented Oct 24, 2023

Just tried the PR, when trying to quasar dev on app-general I got this:

image

@viktoriialurie
Copy link
Collaborator

@goldyfruit the readme has been changed, could you please try to check with the updated instructions?

@goldyfruit
Copy link

@goldyfruit the readme has been changed, could you please try to check with the updated instructions?

This is the error I got with the new README

image

@lexasq
Copy link
Collaborator Author

lexasq commented Oct 25, 2023

@goldyfruit the readme has been changed, could you please try to check with the updated instructions?

This is the error I got with the new README

image

Hi, could you please share content of your env file?

@github-actions
Copy link

Workflow status is failure ❌
Unfortunately test report wasn't generated, it can be if no workspaces changed. Please check the workflow run below.
Link to GitHub workflow: Github Workflow Link

@github-actions
Copy link

Workflow status is failure ❌
Unfortunately test report wasn't generated, it can be if no workspaces changed. Please check the workflow run below.
Link to GitHub workflow: Github Workflow Link

@lexasq
Copy link
Collaborator Author

lexasq commented Oct 25, 2023

@goldyfruit I think I understood your struggle, the updates were made per app READMEs, duplicated those changes to common file as well, hopefully that'll help.

@goldyfruit
Copy link

goldyfruit commented Oct 25, 2023

@goldyfruit I think I understood your struggle, the updates were made per app READMEs, duplicated those changes to common file as well, hopefully that'll help.

Indeed, following the new README allows me to run quasar dev.

image

The build instructions failed on app-general, complaining about Loading failed for the <script> with source “http://localhost:4000/js/main.29127d47.js”.

image

Thanks for your help @lexasq

@goldyfruit
Copy link

Issues seems related to some files with port 4000 referenced in app-general.

  • .quasar/client-entry.js
  • envs/env.prod.json
  • envs/env.json

@lexasq
Copy link
Collaborator Author

lexasq commented Oct 25, 2023

@goldyfruit looks weird, just retested that and its fine. As for the build you got to check the respective instruction in the apps.

image

image

@goldyfruit
Copy link

goldyfruit commented Oct 25, 2023

Issues seems related to some files with port 4000 referenced in app-general.

  • .quasar/client-entry.js
  • envs/env.prod.json
  • envs/env.json

@lexasq After changing port 4000 to 3000 in the files listed above and re-run quasar build its working.

@lexasq
Copy link
Collaborator Author

lexasq commented Oct 25, 2023

Issues seems related to some files with port 4000 referenced in app-general.

  • .quasar/client-entry.js
  • envs/env.prod.json
  • envs/env.json

@lexasq After changing port 4000 to 3000 in the files listed above and re-run quasar build its working.

Don't change anything manually, follw the READMEs

@goldyfruit
Copy link

goldyfruit commented Oct 25, 2023

Don't change anything manually, follw the READMEs

Did it again to make sure (with a fresh clone from your branch), I followed the instructions from the README for both app-expose and app-general:

yarn
yarn lint
yarn format
yarn setup-env:prod
quasar build

Same result:

image

@lexasq
Copy link
Collaborator Author

lexasq commented Oct 25, 2023

Don't change anything manually, follw the READMEs

Did it again to make sure (with a fresh clone from your branch), I followed the instructions from the README for both app-expose and app-general:

yarn
yarn lint
yarn format
yarn setup-env:prod
quasar build

Same result:

image

You most definitely didin't, app-general is set to be hosted on port 4000.

@goldyfruit
Copy link

@goldyfruit looks weird, just retested that and its fine. As for the build you got to check the respective instruction in the apps.

image

image

But in this screenshot you are running on port 3000, I'm confused.

@goldyfruit
Copy link

@goldyfruit looks weird, just retested that and its fine. As for the build you got to check the respective instruction in the apps.
image
image

But in this screenshot you are running on port 3000, I'm confused.

When running quasar serve on port 4000 its working. 👍

@goldyfruit
Copy link

One side note, maybe the main README should be updated with the correct ports as well:

image

Thanks again for your help (and patience) @lexasq

@lexasq
Copy link
Collaborator Author

lexasq commented Oct 25, 2023

@lexasq
Copy link
Collaborator Author

lexasq commented Oct 25, 2023

One side note, maybe the main README should be updated with the correct ports as well:

image

Thanks again for your help (and patience) @lexasq

You can change port in the env file for prod, just don't forget to use the correct command for quasar, as for the dev you change port in the config file.

@goldyfruit
Copy link

One side note, maybe the main README should be updated with the correct ports as well:
image
Thanks again for your help (and patience) @lexasq

You can change port in the env file for prod, just don't forget to use the correct command for quasar, as for the dev you change port in the config file.

Thanks!

@github-actions
Copy link

Workflow status is failure ❌
Unfortunately test report wasn't generated, it can be if no workspaces changed. Please check the workflow run below.
Link to GitHub workflow: Github Workflow Link

@@ -37,6 +37,8 @@ npm run format
```bash
yarn setup-env:prod
quasar build
cd dist spa

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be dist/spa.

@@ -37,6 +37,8 @@ npm run format
```bash
yarn setup-env:prod
quasar build
cd dist spa

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be dist/spa as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, overlooked that!

@github-actions
Copy link

Workflow status is failure ❌
Unfortunately test report wasn't generated, it can be if no workspaces changed. Please check the workflow run below.
Link to GitHub workflow: Github Workflow Link

Copy link

github-actions bot commented Nov 1, 2023

Workflow status is failure ❌
Unfortunately test report wasn't generated, it can be if no workspaces changed. Please check the workflow run below.
Link to GitHub workflow: Github Workflow Link

@lexasq lexasq merged commit 067477a into module-federation:master Nov 1, 2023
9 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow-failure Workflow is failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants