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

fix(websocket): bump ts-node to fix startup error #22563

Merged
merged 1 commit into from
Jan 2, 2023

Conversation

villebro
Copy link
Member

@villebro villebro commented Dec 31, 2022

SUMMARY

Currently the websocket server is unable to start with the following error:

$ npm run dev-server

> superset-websocket@0.0.1 dev-server
> ts-node src/index.ts start

/Users/ville/apple/apache-superset/superset-websocket/node_modules/typescript/lib/typescript.js:43495
        ts.Debug.assert(typeof typeReferenceDirectiveName === "string", "Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");
                 ^
Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.
    at Object.resolveTypeReferenceDirective (/Users/ville/apple/apache-superset/superset-websocket/node_modules/typescript/lib/typescript.js:43495:18)
    at /Users/ville/apple/apache-superset/superset-websocket/node_modules/ts-node/src/index.ts:623:55
    at Array.map (<anonymous>)
    at Object.resolveTypeReferenceDirectives (/Users/ville/apple/apache-superset/superset-websocket/node_modules/ts-node/src/index.ts:622:33)
    at actualResolveTypeReferenceDirectiveNamesWorker (/Users/ville/apple/apache-superset/superset-websocket/node_modules/typescript/lib/typescript.js:119377:163)
    at resolveTypeReferenceDirectiveNamesWorker (/Users/ville/apple/apache-superset/superset-websocket/node_modules/typescript/lib/typescript.js:119677:26)
    at processTypeReferenceDirectives (/Users/ville/apple/apache-superset/superset-websocket/node_modules/typescript/lib/typescript.js:121180:31)
    at findSourceFileWorker (/Users/ville/apple/apache-superset/superset-websocket/node_modules/typescript/lib/typescript.js:121065:21)
    at findSourceFile (/Users/ville/apple/apache-superset/superset-websocket/node_modules/typescript/lib/typescript.js:120917:26)
    at processImportedModules (/Users/ville/apple/apache-superset/superset-websocket/node_modules/typescript/lib/typescript.js:121326:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! superset-websocket@0.0.1 dev-server: `ts-node src/index.ts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the superset-websocket@0.0.1 dev-server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ville/.npm/_logs/2022-12-31T10_58_28_930Z-debug.log

This fixes the problem by bumping ts-node to the most recent stable version. Now the server starts as expected:

$ npm run dev-server

> superset-websocket@0.0.1 dev-server
> ts-node src/index.ts start

{"message":"Server started on port 8080","level":"info"}

In addition, the version referenced by .nvmrc is updated to reflect the requirement specified in package.json, and the build steps are changed to use npm ci instead of running npm install.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@villebro villebro force-pushed the villebro/fix-websocket branch 2 times, most recently from 590b117 to 3176ece Compare December 31, 2022 11:41
@villebro villebro closed this Dec 31, 2022
@villebro villebro reopened this Dec 31, 2022
@villebro villebro closed this Jan 1, 2023
@villebro villebro reopened this Jan 1, 2023
Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I think we should relocate the superset-websocket into the superset-frontend.

@villebro villebro merged commit 7df1d70 into apache:master Jan 2, 2023
@villebro villebro deleted the villebro/fix-websocket branch January 2, 2023 17:12
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants