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

Problems with .env and @quasar/app-webpack v4 #17744

Open
bergmorten opened this issue Jan 9, 2025 · 1 comment
Open

Problems with .env and @quasar/app-webpack v4 #17744

bergmorten opened this issue Jan 9, 2025 · 1 comment

Comments

@bergmorten
Copy link

bergmorten commented Jan 9, 2025

What happened?

I upgraded my project to the new @quasar/[email protected], it builds fine for spa and dev mode, however when I build for PWA with InjectManifest I got errors compiling.

On windows the build does not like environment variable like ProgramFiles(x86) or CommonProgramFiles(x86), and linux it does not like e.g. BASH_FUNC_which%%.

I solve this my manually remove those in quasar.conf.ts. In the past I use dotenv which did not cause this problem.

delete process.env['CommonProgramFiles(x86)'];
delete process.env['ProgramFiles(x86)'];
delete process.env['BASH_FUNC_which%%'];

Below is the error log when not removing them:

2025-01-09T12:02:26.223Z [INFO]: App • Using quasar.config.ts in "ts" format
2025-01-09T12:02:27.628Z [INFO]: App • WAIT • Compiling of InjectManifest Custom SW with Esbuild in progress...
2025-01-09T12:02:27.634Z [WARNING]: (node:7255) ESLintIgnoreWarning: The ".eslintignore" file is no longer supported. Switch to using the "ignores" property in "eslint.config.js": https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
(Use `node --trace-warnings ...` to show where the warning was created)
✘ [ERROR] Expected "." but found "%"
(define name):1:27:
1 │ process.env.BASH_FUNC_which%%
│ ^
╵ .
2025-01-09T12:02:27.635Z [WARNING]: Error: Build failed with 1 error:
(define name):1:27: ERROR: Expected "." but found "%"
at failureErrorWithLog (/codebuild/output/src3633021086/src/aws-clients/node_modules/esbuild/lib/main.js:1476:15)
at /codebuild/output/src3633021086/src/aws-clients/node_modules/esbuild/lib/main.js:945:25
at runOnEndCallbacks (/codebuild/output/src3633021086/src/aws-clients/node_modules/esbuild/lib/main.js:1316:45)
at buildResponseToResult (/codebuild/output/src3633021086/src/aws-clients/node_modules/esbuild/lib/main.js:943:7)
at /codebuild/output/src3633021086/src/aws-clients/node_modules/esbuild/lib/main.js:970:16
at responseCallbacks.<computed> (/codebuild/output/src3633021086/src/aws-clients/node_modules/esbuild/lib/main.js:622:9)
at handleIncomingPacket (/codebuild/output/src3633021086/src/aws-clients/node_modules/esbuild/lib/main.js:677:12)
at Socket.readFromStdout (/codebuild/output/src3633021086/src/aws-clients/node_modules/esbuild/lib/main.js:600:7)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12) {
errors: [Getter/Setter],
warnings: [Getter/Setter]
}
2025-01-09T12:02:27.635Z [WARNING]: App • ⚠️ FAIL App build failed (check the log above)

What did you expect to happen?

It should build with environment names that can include invalid characters like (,),%....

Reproduction URL

not relevant

How to reproduce?

Build PWA mode with inject manifest on a system with environment names containing special chars (e.g. %)

Flavour

Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)

Areas

PWA Mode

Platforms/Browsers

No response

Quasar info output

No response

Relevant log output

No response

Additional context

No response

Copy link

github-actions bot commented Jan 9, 2025

Hi @bergmorten! 👋

It looks like you provided an invalid or unsupported reproduction URL.
Do not use any service other than Codepen, jsFiddle, StackBlitz, Codesandbox, and GitHub.
Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc.
Please edit your original post above and provide a valid reproduction URL as explained.

Without a proper reproduction, your issue will have to get closed.

Thank you for your collaboration. 👏

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

No branches or pull requests

1 participant