RocketChat / RocketChat/Rocket.Chat

Yarn Build and run error on WSL Ubuntu on Rocketchat setup

Open
#31,241 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

On the project setup with all required dependencies installed (ubuntu, node, yarn, and meteor) on WSL Ubuntu, throws the below error.

Server Setup Information:
Rocketchat - latest 6.5.0
node - 14.21.3
yarn - 3.5.0
meteor - 2.13.3

Steps to reproduce:
Followed official windows setup steps - https://developer.rocket.chat/open-source-projects/server/server-environment-setup/windows-10


yarn

➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 1s 227ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 2s 869ms
➤ YN0000: ┌ Link step
➤ YN0007: │ isolated-vm@npm:4.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ event-loop-stats@npm:1.4.1 must be built because it never has been before or the last one failed
➤ YN0009: │ isolated-vm@npm:4.4.2 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-8391a3d8/build.log)
➤ YN0009: │ event-loop-stats@npm:1.4.1 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-e778c53c/build.log)
➤ YN0000: └ Completed in 8s 969ms
➤ YN0000: Failed with errors in 13s 593ms


yarn build

@rocket.chat/ui-composer:build: src/MessageFooterCallout/MessageFooterCalloutAction.tsx(9,10): error TS2786: 'Button' cannot be used as a JSX component.
@rocket.chat/ui-composer:build:   Its type 'ForwardRefExoticComponent<Pick<{ is?: ElementType<any> | undefined; className?: string | (<T extends readonly unknown[]>(...args: T) => string) | (string | false | 0 | (<T extends readonly unknown[]>(...args: T) => string) | null | undefined)[] | undefined; animated?: boolean | undefined; withRichContent?: boolean |...' is not a valid JSX element type.
@rocket.chat/ui-composer:build:     Type 'ForwardRefExoticComponent<Pick<{ is?: ElementType<any> | undefined; className?: string | (<T extends readonly unknown[]>(...args: T) => string) | (string | false | 0 | (<T extends readonly unknown[]>(...args: T) => string) | null | undefined)[] | undefined; animated?: boolean | undefined; withRichContent?: boolean |...' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'.
@rocket.chat/ui-composer:build:       Type 'ReactElement<any, string | JSXElementConstructor<any>> | null' is not assignable to type 'ReactNode'.
@rocket.chat/ui-composer:build: src/MessageFooterCallout/MessageFooterCalloutContent.tsx(11,10): error TS2786: 'Box' cannot be used as a JSX component.
@rocket.chat/ui-composer:build:   Its type 'MemoExoticComponent<ForwardRefExoticComponent<{ is?: ElementType<any> | undefined; className?: string | (<T extends readonly unknown[]>(...args: T) => string) | (string | false | 0 | (<T extends readonly unknown[]>(...args: T) => string) | null | undefined)[] | undefined; animated?: boolean | undefined; withRichCont...' is not a valid JSX element type.
@rocket.chat/ui-composer:build: src/MessageFooterCallout/MessageFooterCalloutDivider.tsx(6,10): error TS2786: 'Box' cannot be used as a JSX component.
@rocket.chat/ui-composer:build:   Its type 'MemoExoticComponent<ForwardRefExoticComponent<{ is?: ElementType<any> | undefined; className?: string | (<T extends readonly unknown[]>(...args: T) => string) | (string | false | 0 | (<T extends readonly unknown[]>(...args: T) => string) | null | undefined)[] | undefined; animated?: boolean | undefined; withRichCont...' is not a valid JSX element type.
@rocket.chat/ui-composer:build: ERROR: command finished with error: command (/home/<username>/rocketwin/Rocket.Chat/packages/ui-composer) yarn run build exited (2)
@rocket.chat/ui-composer#build: command (/home/<username>/rocketwin/Rocket.Chat/packages/ui-composer) yarn run build exited (2)

 Tasks:    15 successful, 17 total
Cached:    14 cached, 17 total
  Time:    21.866s
Failed:    @rocket.chat/ui-composer#build

 ERROR  run failed: command  exited (2)

yarn dsv

@rocket.chat/ui-composer:build:     Type 'ForwardRefExoticComponent<Pick<{ is?: ElementType<any> | undefined; className?: string | (<T extends readonly unknown[]>(...args: T) => string) | (string | false | 0 | (<T extends readonly unknown[]>(...args: T) => string) | null | undefined)[] | undefined; animated?: boolean | undefined; withRichContent?: boolean |...' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'.
@rocket.chat/ui-composer:build:       Type 'ReactElement<any, string | JSXElementConstructor<any>> | null' is not assignable to type 'ReactNode'.
@rocket.chat/ui-composer:build: src/MessageFooterCallout/MessageFooterCalloutContent.tsx(11,10): error TS2786: 'Box' cannot be used as a JSX component.
@rocket.chat/ui-composer:build:   Its type 'MemoExoticComponent<ForwardRefExoticComponent<{ is?: ElementType<any> | undefined; className?: string | (<T extends readonly unknown[]>(...args: T) => string) | (string | false | 0 | (<T extends readonly unknown[]>(...args: T) => string) | null | undefined)[] | undefined; animated?: boolean | undefined; withRichCont...' is not a valid JSX element type.
@rocket.chat/ui-composer:build: src/MessageFooterCallout/MessageFooterCalloutDivider.tsx(6,10): error TS2786: 'Box' cannot be used as a JSX component.
@rocket.chat/ui-composer:build:   Its type 'MemoExoticComponent<ForwardRefExoticComponent<{ is?: ElementType<any> | undefined; className?: string | (<T extends readonly unknown[]>(...args: T) => string) | (string | false | 0 | (<T extends readonly unknown[]>(...args: T) => string) | null | undefined)[] | undefined; animated?: boolean | undefined; withRichCont...' is not a valid JSX element type.
@rocket.chat/ui-composer:build: ERROR: command finished with error: command (/home/<username>/rocketwin/Rocket.Chat/packages/ui-composer) yarn run build exited (2)
@rocket.chat/ui-composer#build: command (/home/<username>/rocketwin/Rocket.Chat/packages/ui-composer) yarn run build exited (2)

 Tasks:    14 successful, 16 total
Cached:    13 cached, 16 total
  Time:    27.156s
Failed:    @rocket.chat/ui-composer#build

 ERROR  run failed: command  exited (2)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported yarn failure on WSL Ubuntu and inspect the isolated-vm and event-loop-stats build logs under /tmp. Then investigate the TypeScript errors in packages/ui-composer/src/MessageFooterCallout/MessageFooterCalloutAction.tsx, MessageFooterCalloutContent.tsx, and MessageFooterCalloutDivider.tsx. Done means the dependency install, yarn build, and yarn dsv commands complete successfully in the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript, ubuntu
Domain
build-system, devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.