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

Quasar build failed with an 'undefined' error, but succeeded with -d option #10470

Closed
2 of 14 tasks
ParticleG opened this issue Aug 25, 2021 · 5 comments
Closed
2 of 14 tasks
Labels

Comments

@ParticleG
Copy link

Describe the bug
quasar build command only success with -d option. Without -d it would raise an "undefined" error.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the project : https://github.com/ParticleG/Lets-Team-Up
  2. Run following commands
npm install
quasar build
  1. Then you would see the error:
Build mode........ spa
 Pkg quasar........ v2.0.4
 Pkg @quasar/app... v3.1.0
 Pkg webpack....... v5
 Debugging......... no
 Publishing........ no

 Configured browser support (>= 88.74% of global marketshare):
 · Chrome for Android >= 92
 · Firefox for Android >= 90
 · Android >= 92
 · Chrome >= 83
 · Edge >= 89
 · Firefox >= 82
 · iOS >= 11.0-11.2
 · Opera >= 74
 · Safari >= 11.1

 App • Chaining "UI" Webpack config
 App • Cleaned build artifact: "{YOUR_FOLDER}\lets_team_up\dist\spa"
 App •  WAIT  • Compiling of "UI" in progress...
 App •  DONE  • "UI" compiled with errors • 15658ms

 App •  ERROR  •  UI  

undefined


 App •  COMPILATION FAILED  • Please check the log above for details.

4.Now try to build in debug mode:
Run following commands

quasar build -d

5.It should now build without any error

Expected behavior
Whether -d option is given or not, the project should be built with no errors

Screenshots
Try building release:
try building release

Try building debug:
image

Platform (please complete the following information):
Quasar Version: 2.0.0
@quasar/app Version: 3.0.0

Quasar mode:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

Tested on:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

OS: Windows 11 Pro (21H2, 22000.160)
Node: 14.17.4
NPM: 6.14.14
Yarn: Not installed
Browsers: Microsoft Edge (92.0.902.78)
iOS: Haven't tested
Android: Haven't tested
Electron: Haven't tested

@ParticleG ParticleG added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Aug 25, 2021
@ParticleG ParticleG changed the title Quasar build failed in release mode, but succeeded with -d option Quasar build failed with an 'undefined' error, but succeeded with -d option Aug 25, 2021
@faxinwang
Copy link

I have a similer pro
blem. When I upgrade quasar from 2.0.4 to 2.2.2 and @quasar/app from 3.1.0 to 3.1.7 . I got :
image

Then I rollback to the original versions, the problem still exists. Since I have not put yarn.lock input git repository, now I can not go back and can not get the project running up. I really don't know where the problem is.

@rstoenescu
Copy link
Member

Hi,

Thank you both for reporting.
This is a two-parter: first one I enhanced the error reporting; then by seeing the actual problem in your cases I could take care of your usage in index.template.html (the productName and productDescription needed to be escaped before injecting into the html file).

Improvement + Fix will be available in "@quasar/app" v3.1.11

@faxinwang
Copy link

With the new error reporting, I still can't figure out what it is that caused this problem.

image

do you have some insight on it?

Note, there is no difference when I comment the productName and productDescription in the index.template.html file.

@SuMon-DevXHub
Copy link

SuMon-DevXHub commented Feb 12, 2023

I'm using

  • node -v = 18.12.0,
  • npm -v =8.19.2,
  • yarn -v=1.22.19

image

And also follow above solution but this problem is not solve yet

@rstoenescu please check.

@yusufkandemir
Copy link
Member

@SuMon-DevXHub you didn't provide any useful information and it's been so long since I last see this error, but I am going to take a guess and say that you were migrating from q/app v1 to v2 and skipped a step.
https://v1.quasar.dev/quasar-cli/app-upgrade-guide#required-steps:

Edit your /src/index.template.html file:
search for “htmlWebpackPlugin.options.” and replace with “” (empty string)

If not, then provide some context. What is the output of quasar info, what was the last thing you did before the error occurred, etc.?

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

No branches or pull requests

5 participants