I can't setup the project locally: yarn install gives an error

Description

I followed the same instructions as in the official documentation for setting up the Rocket.Chat project from https://developer.rocket.chat/docs/linux

Setup Information

  • Version of Rocket.Chat Server: 6.14.0-develop
  • Operating System: Ubuntu
  • NodeJS Version: 14.21.3
  • npm version: 6.14.18
  • isolated-vm: npm:4.4.2,
  • node-gyp: ^9.4.1

Any additional Information

yarn install:

➤ YN0002: │ @storybook/telemetry@npm:6.5.16 doesn't provide react (p48f29), requested by @storybook/core-common
➤ YN0002: │ @storybook/telemetry@npm:6.5.16 doesn't provide react-dom (p479a1), requested by @storybook/core-common
➤ 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 235ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 1s 744ms
➤ 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: │ event-loop-stats@npm:1.4.1 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-aa4e4d43/build.log)
➤ YN0009: │ isolated-vm@npm:4.4.2 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-cb9752ff/build.log)
➤ YN0009: │ isolated-vm@npm:4.4.2 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-c0b63d43/build.log)
➤ YN0000: └ Completed in 4s 818ms
➤ YN0000: Failed with errors in 8s 113ms

yarn dsv:

@rocket.chat/pdf-worker:build:   
@rocket.chat/pdf-worker:build: ERROR: command finished with error: command (/home/suraj-pal/Rocket.Chat/ee/packages/pdf-worker) /tmp/xfs-8fe46753/yarn run build exited (2)
@rocket.chat/model-typings:build: 
@rocket.chat/rest-typings:build: 
@rocket.chat/pdf-worker#build: command (/home/suraj-pal/Rocket.Chat/ee/packages/pdf-worker) /tmp/xfs-8fe46753/yarn run build exited (2)

 Tasks:    19 successful, 23 total
Cached:    19 cached, 23 total
  Time:    11.464s 
Failed:    @rocket.chat/pdf-worker#build

 ERROR  run failed: command  exited (2)

As per the docs just run yarn

It does not need yarn install

Thankyou for reply @reetp but it gives same errors for yarn only

You don’t need to @ anyone thanks.

If people want to respond they will. Nagging won’t help.

I had to do this on my Ubuntu 22.04 just now

curl -fsSL https://deno.land/x/install/install.sh | sudo DENO_INSTALL=/usr/local sh

yarn

yarn dsv

And I get:

@rocket.chat/meteor:dsv: I20241009-14:47:04.523(2)? +-----------------------------------------------+
@rocket.chat/meteor:dsv: I20241009-14:47:04.524(2)? |                 SERVER RUNNING                |
@rocket.chat/meteor:dsv: I20241009-14:47:04.525(2)? +-----------------------------------------------+
@rocket.chat/meteor:dsv: I20241009-14:47:04.525(2)? |                                               |
@rocket.chat/meteor:dsv: I20241009-14:47:04.526(2)? |  Rocket.Chat Version: 6.14.0-develop          |
@rocket.chat/meteor:dsv: I20241009-14:47:04.526(2)? |       NodeJS Version: 14.21.4 - x64           |
@rocket.chat/meteor:dsv: I20241009-14:47:04.526(2)? |      MongoDB Version: 7.0.5                   |
@rocket.chat/meteor:dsv: I20241009-14:47:04.526(2)? |       MongoDB Engine: wiredTiger              |
@rocket.chat/meteor:dsv: I20241009-14:47:04.526(2)? |             Platform: linux                   |
@rocket.chat/meteor:dsv: I20241009-14:47:04.527(2)? |         Process Port: 22245                   |
@rocket.chat/meteor:dsv: I20241009-14:47:04.527(2)? |             Site URL: http://localhost:3000/  |
@rocket.chat/meteor:dsv: I20241009-14:47:04.527(2)? |     ReplicaSet OpLog: Enabled                 |
@rocket.chat/meteor:dsv: I20241009-14:47:04.527(2)? |          Commit Hash: d9fe5bbe0b              |
@rocket.chat/meteor:dsv: I20241009-14:47:04.528(2)? |        Commit Branch: develop                 |
@rocket.chat/meteor:dsv: I20241009-14:47:04.528(2)? |                                               |
@rocket.chat/meteor:dsv: I20241009-14:47:04.528(2)? +-----------------------------------------------+

When I am running ‘yarn dsv’ follwing by ‘yarn’ error occured showing app crashing
these are the error logs on running ‘yarn’ :
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-e844dfa2/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-a68cd582/build.log)
➤ YN0000: └ Completed in 4s 351ms
➤ YN0000: Failed with errors in 7s 984ms

Your setup is wrong somewhere - I literally did a test build yesterday.

Check the docs.

Windows: WSL + 12Gb RAM minimum.

Node 14.21.x
Meteor: 2.6.x
NPM 6.4.18 (but don’t upgrade your npm above that)

Install Deno

curl -fsSL https://deno.land/x/install/install.sh | sudo DENO_INSTALL=/usr/local sh

yarn
yarn dsv

I see

npm:4.4.2

Install and use nvm and install a newer version of npm as above.

I am working on Ubuntu 24.04.1, I followed docs don’t know why it is failing on my device.

at Module.moduleLink [as link] (/home/thepiyush/.meteor/packages/modules/.0.20.0.6v46ku.p2z8q++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:52:22)
@rocket.chat/meteor:dsv: W20241012-11:29:36.651(5.5)? (STDERR) at module (server/services/startup.ts:1:50)
@rocket.chat/meteor:dsv: W20241012-11:29:36.651(5.5)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7) {
@rocket.chat/meteor:dsv: W20241012-11:29:36.651(5.5)? (STDERR) code: ‘MODULE_NOT_FOUND’,
@rocket.chat/meteor:dsv: W20241012-11:29:36.651(5.5)? (STDERR) requireStack: [
@rocket.chat/meteor:dsv: W20241012-11:29:36.651(5.5)? (STDERR) ‘/home/thepiyush/Desktop/dros/Rocket.Chat/apps/meteor/node_modules/isolated-vm/isolated-vm.js’,
@rocket.chat/meteor:dsv: W20241012-11:29:36.652(5.5)? (STDERR) ‘/home/thepiyush/Desktop/dros/Rocket.Chat/apps/meteor/.meteor/local/build/programs/server/npm-require.js’,
@rocket.chat/meteor:dsv: W20241012-11:29:36.652(5.5)? (STDERR) ‘/home/thepiyush/Desktop/dros/Rocket.Chat/apps/meteor/.meteor/local/build/programs/server/boot.js’,
@rocket.chat/meteor:dsv: W20241012-11:29:36.652(5.5)? (STDERR) ‘/home/thepiyush/Desktop/dros/Rocket.Chat/apps/meteor/.meteor/local/build/main.js’
@rocket.chat/meteor:dsv: W20241012-11:29:36.652(5.5)? (STDERR) ]
@rocket.chat/meteor:dsv: W20241012-11:29:36.652(5.5)? (STDERR) }
@rocket.chat/meteor:dsv: => Exited with code: 1
@rocket.chat/meteor:dsv: => Your application is crashing. Waiting for file change.

These are some logs. Please Help!

Check versions of

Node
Npm
Meteor
Denon.

Node - v14.21.3,
NPM - 6.14.18,
Meteor - Meteor 2.6,
Deno - deno 2.0.0 (stable, release, x86_64-unknown-linux-gnu)
v8 12.9.202.13-rusty
typescript 5.6.2

the error says 'Cannot find module ‘./out/isolated_vm’ ’ while running yarn dsv

What version of Rocket.Chat?

version - 6.13.0-develop

Go back, clear out, and install all the required bits again and document it as you go.

You have done something wrong somewhere but hard to tell what.

(I don’t believe it is Ubuntu 24.04 but I haven’t personally tested on it, but no reason to suspect it is the issue)

Everything works fine the problem occurs when running yarn inside the dir

Works Completely fine now.
I think what worked for me is installing ‘python-setuptools’ or you can try changing meteor version if facing the same problem.
Also you can refer to : Yarn Install Error: Peer Dependencies Issue · Issue #31443 · RocketChat/Rocket.Chat · GitHub.
Thanks

Excellent.

And well done for following up with a link to your solution.