Describe the bug
I was trying to update quasar version from 1.9.12 to 1.12.13 when I notice the following error:

Then, I updated the versions incrementally, and found the breaking change in version 1.9.14.
These are my dependencies in [package.json]
"dependencies": {
"@fortawesome/fontawesome-pro": "5.12.1",
"axios": "0.19.2",
"core-js": "3.6.4",
"keycloak-js": "8.0.0",
"lodash-es": "4.17.15",
"moment": "2.24.0",
"moment-timezone": "0.5.27",
"quasar": "1.9.14",
"regenerator-runtime": "0.13.3",
"vue": "2.6.10",
"vue-i18n": "8.12.0",
"vue-router": "3.0.7",
"vuex": "3.1.1"
},
"devDependencies": {
"@babel/core": "7.10.4",
"@babel/plugin-proposal-class-properties": "7.10.4",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-transform-typescript": "7.10.4",
"@babel/preset-env": "7.10.4",
"@babel/preset-typescript": "7.10.4",
"@kazupon/vue-i18n-loader": "0.3.0",
"@types/jest": "25.1.2",
"@types/lodash": "4.14.149",
"@types/moment-timezone": "0.5.12",
"@typescript-eslint/eslint-plugin": "2.19.2",
"@typescript-eslint/eslint-plugin-tslint": "2.19.2",
"@typescript-eslint/parser": "2.19.2",
"@vue/test-utils": "1.0.0-beta.31",
"archiver": "3.1.1",
"autoprefixer": "9.7.4",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "25.1.0",
"babel-loader": "8.0.6",
"babel-plugin-lodash": "3.3.4",
"babel-preset-env": "1.7.0",
"chalk": "2.4.2",
"clean-webpack-plugin": "3.0.0",
"command-line-args": "5.1.1",
"copy-webpack-plugin": "5.0.3",
"cross-env": "5.2.0",
"css-loader": "3.0.0",
"eslint": "6.8.0",
"eslint-config-prettier": "6.10.0",
"eslint-plugin-jest": "23.7.0",
"eslint-plugin-prettier": "3.1.2",
"file-loader": "4.0.0",
"fork-ts-checker-webpack-plugin": "4.0.3",
"friendly-errors-webpack-plugin": "1.7.0",
"html-webpack-plugin": "3.2.0",
"jest": "25.1.0",
"jest-junit": "10.0.0",
"jest-sonar": "0.2.7",
"jest-transform-css": "2.0.0",
"lodash-webpack-plugin": "0.11.5",
"mini-css-extract-plugin": "0.9.0",
"node-sass": "4.13.1",
"optimize-css-assets-webpack-plugin": "5.0.3",
"ora": "4.0.3",
"prettier": "1.19.1",
"sass-loader": "8.0.2",
"semver": "7.1.2",
"shelljs": "0.8.3",
"stylelint": "13.0.0",
"stylelint-config-prettier": "8.0.1",
"stylelint-prettier": "1.1.2",
"stylelint-webpack-plugin": "1.2.1",
"terser-webpack-plugin": "2.3.4",
"ts-jest": "25.2.0",
"tslint": "6.0.0",
"typescript": "3.6.4",
"url-loader": "3.0.0",
"vue-eslint-parser": "7.0.0",
"vue-jest": "3.0.5",
"vue-loader": "15.7.0",
"vue-style-loader": "4.1.2",
"vue-template-compiler": "2.6.10",
"webpack": "4.41.5",
"webpack-bundle-analyzer": "3.6.0",
"webpack-cli": "3.3.10",
"webpack-dev-server": "3.10.3",
"webpack-merge": "4.2.2",
"webpack-pwa-manifest": "4.1.1",
"workbox-webpack-plugin": "5.0.0"
}
}
Platform
OS: Windows
Node: v12.16.1
NPM: 6.13.4
Browsers: Chrome
Additional context
The application was not generated with QuasarCli
It the same issue -> #7447
I would really like to understand how or were QuasarIconSet is defined.
Just checking the types d茅finitions in the source code:
shim-icon-set.d.ts
The QuasarIconSet is imported from "quasar";
However if I check other imports, like the one in globals.d.ts
The QuasarIconSet is imported from "./extras/icon-set";
So, I think the import error is hidden by the @ts-ignore in the shim-icon-set.d.ts file.
I created a Pull request #7648 with the proposed fix
Thanks for the PR!
It will go into Quasar v1.13.0.
@jhisworking @rstoenescu
AFAIK, the merged PR proposed here actually broke a working setup, instead of fixing something.
Relative imports cannot be used inside an ambient declaration module (as is quasar/icon-set/* one).
import { QuasarIconSet } from "quasar"; correctly reference QuasarIconSet from quasar package at runtime.
The @ts-ignore, as stated by the comment right above, was needed to avoid complaints at build time, as we know quasar package will be available at runtime.
Leaving the @ts-ignore actually masked the error which has been introduced with this PR, which have the effect of considering all icon sets as any, as TS cannot understand the type.
Nobody yet has been able to provide a repro to Cannot use namespace QuasarIconSet as type error, as it's usually a local environment problem with incompatible dependencies and many resolved it with a yarn.lock refresh and VSCode restart.
Another hint on this not being the problem is the fact that people still hit this error even on Quasar versions which contains this "fix": https://github.com/quasarframework/quasar/issues/7805
Can we revert https://github.com/quasarframework/quasar/pull/7648 ?