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

Kibana (https://github.com/elastic/kibana/) #26

Closed
hverlin opened this issue Dec 25, 2023 · 1 comment
Closed

Kibana (https://github.com/elastic/kibana/) #26

hverlin opened this issue Dec 25, 2023 · 1 comment

Comments

@hverlin
Copy link

hverlin commented Dec 25, 2023

#NodeToDenoChallenge with https://github.com/elastic/kibana/

Seems to be 3,212,395 lines of typescript
❯ tokei --compact
===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 AsciiDoc              720        88066        65884          993        21189
 BASH                    1          454          417           30            7
 Batch                   7          259          190            4           65
 CSS                     8        11493        10948          221          324
 Dockerfile              3          331          220           53           58
 Handlebars             37          507          451            0           56
 HTML                    9          287          266            1           20
 JavaScript           3646       279280       213605        36582        29093
 JSON                 4237      3703813      3697090            0         6723
 JSX                     3           38           27            5            6
 Makefile                2           44           32            0           12
 Markdown             1051        54831            0        40288        14543
 Mustache                2          164          140            0           24
 Perl                    2          432          323           43           66
 Python                  3          194          134           25           35
 Sass                  702        17275        13589         1183         2503
 Shell                 187         5920         3315         1658          947
 SVG                   420        28805        28762           28           15
 Plain Text            150         4491            0         3858          633
 TSX                 15802      1964845      1645632       129174       190039
 TypeScript          38744      4006954      3212395       401778       392781
 XML                    10          378          368            5            5
 YAML                 1162        76621        75138          466         1017
===============================================================================
 Total               66908     10245482      8968926       616395       660161
===============================================================================

Running with deno

❯ deno run -A scripts/kibana.js
Warning Sloppy imports are not recommended and have a negative impact on performance.
error: Uncaught (in promise) ReferenceError: require is not defined
require('../src/cli/dev');

After modifying the require in https://github.com/elastic/kibana/blob/main/scripts/kibana.js to

import { createRequire } from 'node:module'
const require = createRequire(import.meta.url);

require('../src/cli/dev');

and running yarn kbn bootstrap (as specified in the getting-started guide) and using

{
  "unstable": [
    "bare-node-builtins",
    "byonm",
    "sloppy-imports",
    "unsafe-proto"
  ]
}
❯ deno run -A scripts/kibana.js
Warning Sloppy imports are not recommended and have a negative impact on performance.
Kibana does not support the current Node.js version v18.18.0. Please use Node.js v18.18.2.

After removing the validation (//process.exit(1);) in https://github.com/elastic/kibana/blob/main/src/setup_node_env/node_version_validator.js)

❯ deno run -A scripts/kibana.js
Warning Sloppy imports are not recommended and have a negative impact on performance.
Kibana does not support the current Node.js version v18.18.0. Please use Node.js v18.18.2.
dyld[37759]: missing symbol called
[1]    37759 abort      deno run -A scripts/kibana.js
image

(Tested on a M1 Mac. I don't develop on this code base but seems to be a very large NodeJS project)

@lambtron
Copy link
Collaborator

lambtron commented Jan 5, 2024

Hi there! Your submission won the Largest Node Project category. Please email [email protected] for more information on your prizes! Thanks again for your participation.

@hverlin hverlin closed this as completed Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants