-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix(app-vite): local import of extensions in windows #17795
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
Conversation
- Possibly fix the issue documented here: "There have been many reports of problems linking via file: and link:. This is outside of Quasar’s reach, but is likely to do with your development environment, aka your mileage with Windows will vary." https://quasar.dev/app-extensions/development-guide/introduction#manually-testing - Now it's possible to load Quasar App Extensions without host in platforms like Github, Gitlab, etc. - Fix errors like for local Quasar App Extension: App •⚠️ App Extension "[ext-name]" has missing index script... - Tested in Windows 10 with local Quasar App Extension
I'm having this issue on linux, I used your code and fixed for me too! Any news on this PR? |
Up! I made the change according to your code and it worked. Any predictions for seeing this PR? |
@rstoenescu we need it, could you consider merging? |
Superseded by #18003. @lvf23 @DouglasCalora @felipejuzo02 @caiotarifa, please test the changes in #18003 and verify the new solution works for you. |
Closing this PR as it has been superseded. Thanks for contributing @lvf23. A simple feedback: you removed the only usage of |
@yusufkandemir How can I test it? Directly in my node_modules like I did before or is there a better way? |
@DouglasCalora, directly modifying node_modules like you did before is sufficient |
@yusufkandemir, glad to help! Thanks for feedback! Will try to improve the code quality next time. Thank you! |
@yusufkandemir done! |
@lvf23 Consegue testar no seu ambiente windows pra ver se resolver o pr dele? |
@DouglasCalora, @yusufkandemir, the PR looks like its working, testing from the PR #18003 Downloading the quasar and the PR branch of the fix and linking it locally in my quasar-project: Lucas@windows-10 MINGW64 ~/Projetos/quasar ((4b0da4c7c...))
$ git status
HEAD detached at upstream/fix-ae-script-path-resolution
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: ui/lang/index.json
no changes added to commit (use "git add" and/or "git commit -a") Installing and compiling with pnpm: $ pnpm install
$ pnpm build Linking with local quasar packages (from quasar-project): $ pnpm install ../quasar
$ pnpm install ../quasar/app-vite The package.json of quasar-project: {
"name": "quasar-project",
"version": "0.0.1",
"description": "A Quasar Project",
"productName": "Quasar App",
"author": "Lucas Vendramini <[email protected]>",
"type": "module",
"private": true,
"scripts": {
"lint": "eslint -c ./eslint.config.js \"./src*/**/*.{js,cjs,mjs,vue}\"",
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
"test": "echo \"No test specified\" && exit 0",
"dev": "quasar dev",
"build": "quasar build",
"postinstall": "quasar prepare"
},
"dependencies": {
"@quasar/extras": "^1.16.4",
"quasar": "^2.16.0",
"quasar-monorepo": "link:..\\quasar",
"vue": "^3.4.18",
"vue-router": "^4.0.0"
},
"devDependencies": {
"@eslint/js": "^9.14.0",
"@quasar/app-vite": "link:..\\quasar\\app-vite",
"@vue/eslint-config-prettier": "^10.1.0",
"autoprefixer": "^10.4.2",
"eslint": "^9.14.0",
"eslint-plugin-vue": "^9.30.0",
"globals": "^15.12.0",
"postcss": "^8.4.14",
"prettier": "^3.3.3",
"quasar-app-extension-my-ext": "file:../quasar-app-extension-my-ext",
"vite-plugin-checker": "^0.9.0"
},
"engines": {
"node": "^28 || ^26 || ^24 || ^22 || ^20 || ^18",
"npm": ">= 6.13.4",
"yarn": ">= 1.21.1"
}
} Here is the index of my dummy quasar app extension, i just added a dummy test that was installed before in quasar-project following the instructions in https://quasar.dev/app-extensions/development-guide/introduction#manually-testing: /**
* Quasar App Extension index/runner script
* (runs on each dev/build)
*
* Docs: https://quasar.dev/app-extensions/development-guide/index-api
*/
export default function (api) {
//
console.log('hello!');
} Output of quasar-project after installing a dummy quasar app extension my app Lucas@windows-10 MINGW64 ~/Projetos/quasar-project (main)
$ npm run dev
npm warn Unknown project config "shamefully-hoist". This will stop working in the next major version of npm.
npm warn Unknown project config "strict-peer-dependencies". This will stop working in the next major version of npm.
npm warn Unknown project config "resolution-mode". This will stop working in the next major version of npm.
> [email protected] dev
> quasar dev
.d88888b.
d88P" "Y88b
888 888
888 888 888 888 8888b. .d8888b 8888b. 888d888
888 888 888 888 "88b 88K "88b 888P"
888 Y8b 888 888 888 .d888888 "Y8888b. .d888888 888
Y88b.Y8b88P Y88b 888 888 888 X88 888 888 888
"Y888888" "Y88888 "Y888888 88888P' "Y888888 888
Y8b
App • Using quasar.config.js in "esm" format
App • Running "my-ext" Quasar App Extension...
hello!
» Reported at............ 13/05/2025 20:08:26
» App dir................ C:\Users\Lucas\Projetos\quasar-project
» App URL................ http://192.168.1.10:9000/
http://localhost:9000/
» Dev mode............... spa
» Pkg quasar............. v2.18.1
» Pkg @quasar/app-vite... v2.2.0
» Browser target......... es2022|firefox115|chrome115|safari14
App • Opening default browser at http://localhost:9000/ Now, if I back to original package.json of dummy quasar-project and run npm install: {
"name": "quasar-project",
"version": "0.0.1",
"description": "A Quasar Project",
"productName": "Quasar App",
"author": "Lucas Vendramini <[email protected]>",
"type": "module",
"private": true,
"scripts": {
"lint": "eslint -c ./eslint.config.js \"./src*/**/*.{js,cjs,mjs,vue}\"",
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
"test": "echo \"No test specified\" && exit 0",
"dev": "quasar dev",
"build": "quasar build",
"postinstall": "quasar prepare"
},
"dependencies": {
"@quasar/extras": "^1.16.4",
"quasar": "^2.16.0",
"vue": "^3.4.18",
"vue-router": "^4.0.0"
},
"devDependencies": {
"@eslint/js": "^9.14.0",
"@quasar/app-vite": "^2.1.0",
"@vue/eslint-config-prettier": "^10.1.0",
"autoprefixer": "^10.4.2",
"eslint": "^9.14.0",
"eslint-plugin-vue": "^9.30.0",
"globals": "^15.12.0",
"postcss": "^8.4.14",
"prettier": "^3.3.3",
"quasar-app-extension-my-ext": "file:../quasar-app-extension-my-ext",
"vite-plugin-checker": "^0.9.0"
},
"engines": {
"node": "^28 || ^26 || ^24 || ^22 || ^20 || ^18",
"npm": ">= 6.13.4",
"yarn": ">= 1.21.1"
}
} This error comes back:
Based on the provided examples, in Windows 10, everything seems to be working properly in this PR. P.S.: I observed that the error of link:/file:, described in quasar docs, that pnpm uses link: and npm uses file:, if you use pnpm to install the local packages and then use npm to run scripts, npm would not be able to handle link: references. So, you need to replace link: to file: in order to work. |
"There have been many reports of problems linking via file: and link:. This is outside of Quasar’s reach, but is likely to do with your development environment, aka your mileage with Windows will vary."
https://quasar.dev/app-extensions/development-guide/introduction#manually-testing
Now it's possible to load Quasar App Extensions without host in platforms like Github, Gitlab, etc.
Fix errors like for local Quasar App Extension:
App •⚠️ App Extension "[ext-name]" has missing index script...
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
The PR fulfills these requirements:
dev
branch (orv[X]
branch)fix: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
Any adaptation needed do not hesitate to call me. I could adjust it or give more feedback. Feel free to edit according to the better fit for the project.