Closed Vishal474 closed 2 years ago
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.
@Vishal474 this is possibly related to #793
Can you please try to:
package.json
to the same as the superset-ui
version you're usingincubator-superset/superset-frontend/package.json
yarn install
and yarn build
in superset-ui
npm run dev-server
in incubator-superset/superset-frontend
And let me know if the issue is fixed?
Hi @codepic, tried the steps suggested but ran into below issues -
@superset-ui/plugin-chart-hello-world: ../../scripts/tsc.sh: line 9: exit: error TS5083: Cannot read file '/home/vishaljeet/Desktop/superset_local/superset-ui/plugins/plugin-chart-hello-world/tsconfig.json'.: numeric argument required
lerna ERR! ../../scripts/tsc.sh --build exited 2 in '@superset-ui/plugin-chart-hello-world'
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
../../scripts/tsc.sh: line 9: exit: error TS6059: File '/home/vishaljeet/Desktop/superset_local/superset-ui/plugins/plugin-chart-hello-world/src/index.ts' is not under 'rootDir' '/home/vishaljeet/Desktop/superset_local/superset-ui/src'. 'rootDir' is expected to contain all source files.: numeric argument required
lerna ERR! ../../scripts/tsc.sh --build exited 2 in '@superset-ui/plugin-chart-hello-world'
error Command failed with exit code 2.
Content of tsconfig -
{
"compilerOptions": {
"declarationDir": "lib",
"outDir": "lib"
},
"exclude": [
"lib",
"test"
],
"extends": "../../tsconfig.options.json",
"include": [
"src/**/*",
"types/**/*",
"../../types/**/*"
]
}
Hi @Vishal474
In order to yarn build
and yarn jest
successfully, you need to have 2 tsconfig.json files in your plugin directory.
Your best bet is to copy the following files from plugin-chart-echarts:
# run in superset-ui directory
cp ./plugins/plugin-chart-echarts/tsconfig.json ./plugins/plugin-chart-hello-world/
cp ./plugins/plugin-chart-echarts/test/tsconfig.json ./plugins/plugin-chart-hello-world/test/
And after this
# run in superset-ui directory
yarn install
yarn build
yarn jest
And see if all the steps complete without errors.
Hi @codepic
Thanks for the quick update, Adding tsconfig.json to test worked !! Now yarn build and jest are successful. Though i face below error while running dev-server -
TS2305: Module '"../../core/lib"' has no exported member 'supersetTheme'.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/HelloWorld.tsx(48,26):
TS7031: Binding element 'theme' implicitly has an 'any' type.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/HelloWorld.tsx(49,17):
TS7031: Binding element 'theme' implicitly has an 'any' type.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/HelloWorld.tsx(50,23):
TS7031: Binding element 'theme' implicitly has an 'any' type.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/HelloWorld.tsx(51,16):
TS7031: Binding element 'height' implicitly has an 'any' type.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/HelloWorld.tsx(52,15):
TS7031: Binding element 'width' implicitly has an 'any' type.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/HelloWorld.tsx(57,21):
TS7031: Binding element 'theme' implicitly has an 'any' type.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/HelloWorld.tsx(57,28):
TS7031: Binding element 'headerFontSize' implicitly has an 'any' type.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/HelloWorld.tsx(58,23):
TS7031: Binding element 'theme' implicitly has an 'any' type.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/HelloWorld.tsx(58,30):
TS7031: Binding element 'boldText' implicitly has an 'any' type.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/plugin/buildQuery.ts(19,10):
TS2305: Module '"../../../core/lib"' has no exported member 'buildQueryContext'.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/plugin/buildQuery.ts(19,29):
TS2305: Module '"../../../core/lib"' has no exported member 'QueryFormData'.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/plugin/buildQuery.ts(36,38):
TS7006: Parameter 'baseQueryObject' implicitly has an 'any' type.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/plugin/controlPanel.ts(19,10):
TS2305: Module '"../../../core/lib"' has no exported member 't'.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/plugin/controlPanel.ts(19,13):
TS2305: Module '"../../../core/lib"' has no exported member 'validateNonEmpty'.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/plugin/index.ts(19,10):
TS2305: Module '"../../../core/lib"' has no exported member 't'.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/plugin/index.ts(19,13):
TS2305: Module '"../../../core/lib"' has no exported member 'ChartMetadata'.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/plugin/index.ts(19,28):
TS2305: Module '"../../../core/lib"' has no exported member 'ChartPlugin'.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/plugin/transformProps.ts(19,10):
TS2305: Module '"../../../core/lib"' has no exported member 'ChartProps'.
ERROR in /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/plugin-chart-hello-world/src/plugin/transformProps.ts(19,22):
Under /home/vishaljeet/Desktop/superset_local/incubator-superset/superset-frontend/node_modules/@superset-ui/core/lib/index.d.ts
there are no named exports for above mentioned components so the error seems legit. I am unable to understand what could have caused this issue ?
Posting hello-world plugins package.json files for reference as well.
{
"name": "@superset-ui/plugin-chart-hello-world",
"version": "0.15.2",
"description": "Superset Chart - Hello World",
"sideEffects": false,
"main": "lib/index.js",
"module": "esm/index.js",
"files": [
"esm",
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/apache-superset/superset-ui.git"
},
"keywords": [
"superset"
],
"author": "Superset",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/apache-superset/superset-ui/issues"
},
"homepage": "https://github.com/apache-superset/superset-ui#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@superset-ui/core": "^0.15.2",
"@superset-ui/chart-controls": "^0.15.2"
},
"peerDependencies": {
"react": "^16.13.1"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"jest": "^26.0.1"
}
}
Hi Team,
I have fixed the above issue by again linking the module using npm link
command but this have not resulted in plugin being visible at chart selection wizard.
I am unable to find new plugin in registry constant under VizTypeControl.jsx as well.
If i do not use npm link again, i face the above mentioned error. what could be the issue ?
I had the same issue. What I learned is that the versions of superset-frontend and the superset-ui plugins (including dependencies like the yeoman generator) must really match regarding their versions (e.g. 0.37.2 <-> 0.14.9). Reason is that there are lots of breaking / incompatible changes being introduced in both repos with each release/tag.
This is not really a comfortable situation, see also https://github.com/apache-superset/superset-ui/issues/679
The howto-documentation should make this more clear. It works only for a specific version of superset and superset-ui.
The codebase on this repo has been moved to the main Apache Superset repo, and consequently the repo is in the process of being archived. See the Superset Improvement Proposal for details: https://github.com/apache/superset/issues/13013 . While all currently open issues and PRs will be closed, we encourage you to reopen this issue on the main repo if it is still relevant.
Your question.
Though after successful creation i do not see new chart in expolore -> chart selection wizard. Futher on debugging i came across the warning " Hello_world , You should call configure(...) before calling other methods ".
Kindly help me debug this, Attached the log files.
debugging_log.txt npm-dev-server-logs.txt