victorfonseca opened a new issue, #29995: URL: https://github.com/apache/superset/issues/29995
### Bug description When I just follow the basic process to create a plugin, the build process is not working anymore. I did following the README steps, and the error always prompt: npm ci npm run build npm warn deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated npm warn deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm warn deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm warn deprecated [email protected]: this library is no longer supported npm warn deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm warn deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated npm warn deprecated [email protected]: use String.prototype.padStart() npm warn deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added npm warn deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm warn deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm warn deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm warn deprecated @boost/[email protected]: Package has been deprecated. Core has been split into multiple stand-alone packages. https://github.com/milesj/boost added 1431 packages, and audited 1432 packages in 21s 110 packages are looking for funding run `npm fund` for details 68 vulnerabilities (47 moderate, 17 high, 4 critical) To address issues that do not require attention, run: npm audit fix Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. > [email protected] prebuild > rimraf {lib,esm,tsconfig.tsbuildinfo} > [email protected] build > npm run build-cjs && npm run build-esm && npm run ts-types > [email protected] build-cjs > babel src --extensions ".ts,.tsx,.js,.jsx" --copy-files --out-dir lib Successfully compiled 7 files with Babel (398ms). > [email protected] build-esm > BABEL_OUTPUT=esm babel src --extensions ".ts,.tsx,.js,.jsx" --copy-files --out-dir esm Successfully compiled 7 files with Babel (284ms). > [email protected] ts-types > tsc --build > [email protected] postbuild > npm run test > [email protected] test > jest FAIL test/plugin/transformProps.test.ts ● Test suite failed to run The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 17 | * under the License. 18 | */ > 19 | import { ChartProps, supersetTheme } from '@superset-ui/core'; | ^ 20 | import transformProps from '../../src/plugin/transformProps'; 21 | 22 | describe('KeywardChart01 transformProps', () => { at Object.<anonymous> (node_modules/@superset-ui/core/lib/utils/logging.js:24:17) at Object.<anonymous> (node_modules/@superset-ui/core/lib/utils/index.js:45:39) at Object.<anonymous> (node_modules/@superset-ui/core/lib/index.js:13:14) at Object.require (test/plugin/transformProps.test.ts:19:1) FAIL test/plugin/buildQuery.test.ts ● Test suite failed to run The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 17 | * under the License. 18 | */ > 19 | import { buildQueryContext, QueryFormData } from '@superset-ui/core'; | ^ 20 | 21 | /** 22 | * The buildQuery function is used to create an instance of QueryContext that's at Object.<anonymous> (node_modules/@superset-ui/core/lib/utils/logging.js:24:17) at Object.<anonymous> (node_modules/@superset-ui/core/lib/utils/index.js:45:39) at Object.<anonymous> (node_modules/@superset-ui/core/lib/index.js:13:14) at Object.require (src/plugin/buildQuery.ts:19:1) at Object.require (test/plugin/buildQuery.test.ts:19:1) FAIL test/index.test.ts ● Test suite failed to run The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 17 | * under the License. 18 | */ > 19 | import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; | ^ 20 | import buildQuery from './buildQuery'; 21 | import controlPanel from './controlPanel'; 22 | import transformProps from './transformProps'; at Object.<anonymous> (node_modules/@superset-ui/core/lib/utils/logging.js:24:17) at Object.<anonymous> (node_modules/@superset-ui/core/lib/utils/index.js:45:39) at Object.<anonymous> (node_modules/@superset-ui/core/lib/index.js:13:14) at Object.require (src/plugin/index.ts:19:1) at Object.require (src/index.ts:20:1) at Object.require (test/index.test.ts:19:1) Test Suites: 3 failed, 3 total Tests: 0 total Snapshots: 0 total Time: 0.588 s Ran all test suites. ### How to reproduce the bug Create the plugin with YO, follow the steps and then: # keyward-chart-01 This is the Keyward Chart 01 Superset Chart Plugin. ### Usage To build the plugin, run the following commands: ``` npm ci npm run build ``` ### Screenshots/recordings _No response_ ### Superset version master / latest-dev ### Python version Not applicable ### Node version 18 or greater ### Browser Chrome ### Additional context _No response_ ### Checklist - [X] I have searched Superset docs and Slack and didn't find a solution to my problem. - [X] I have searched the GitHub issue tracker and didn't find a similar bug report. - [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
