Trouble: yarn run dev exited (129) when setting locally

Description

Hi. I’m new to Rocket Chat. I’m currently trying to setting Rocket chat locally on my system but I am facing some issues.

I am getting the error message below when I’m running ‘yarn dev’ using the node version as mentioned.

So kindly can you please guide me on how to resolve this issue?

Server Setup Information

  • Version of Rocket.Chat Server:
  • Operating System: Windows 11 64bit
  • Deployment Method:
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version: 14.19.3
  • MongoDB Version:
  • Proxy:
  • Firewalls involved:

Any additional Information

Hi!

Just to make sure: you are trying to learn more about Rocket.Chat in order to develop and change code, right?

I asked that, because if want to only used it in your company or organization, this is the path you should follow: Docker & Docker Compose - Rocket.Chat Docs

with that sad, A good place to hang and ask questions about it, is here, where some developers using windows usually hang out:

let me know if this helps!

Thanks!

Hi,
Have found any solution as I am also getting the same error:

Hi,
I am also getting this error: command (apps/meteor) yarn run dev exited (254)
Have you solved it?

this happens on 6.3.x plz fix

Any reason why non docker installs and documentation are not supported and maintained?

What makes you say that? The latest native code is still there in github. You can deploy and install whenever you want.

However.

It isn’t the ‘preferred method’ as it is usually trickier to install an maintain. You also have to install, configure and maintain your own proxy server etc etc,

I had to give up my original native installs on my server years back because some packages were no longer supported natively - node issues, of which there are many. I moved to docker and it was not an issue thereafter.

The simplest install methods are snaps and docker and it saves a lot of support cycles deploying this way.

Other methods are detailed here:

Debian, Ubuntu and CentOS are all native installs using the latest code releases.

What makes you say that?

Probably my frustration and 3 days struggles to install it on Debian or Devuan(Debian without systemd). A lot of that is due to my low experience and mistakes but …

Problem first - quotes from docs.rocket.chat

Follow the official guide to install NodeJS on a Debian system. Check out our page on supported node versions for your specific version.

Which page?

After some digging - 14.21.3. Hmm isn’t that EoL. NVM

After some more diging, mistakes and trying to extract info from docker images - node version 14.21.4. What?!?!

Lets see what’s in github repo README.md

Ok, why do one needs meteor and yarn to develop but not to run the server. NVM

Lets stick to docs page.

Aaaaand theres a no go after cd /tmp/bundle/programs/server; npm i

node-pre-gyp ERR! install response status 403 Forbidden on https://node-binaries.s3.amazonaws.com/gcstats/v1.4.0/Release/node-v83-linux-x64.tar.gz
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/opt/Rocket.Chat/.nvm/versions/node/v14.21.4/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Linux 6.1.0-20-amd64
gyp ERR! command “/opt/Rocket.Chat/.nvm/versions/node/v14.21.4/bin/node” “/opt/Rocket.Chat/.nvm/versions/node/v14.21.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “configure” “–fallback-to-build” “–module=/tmp/bundle/programs/server/npm/node_modules/gc-stats/build/gcstats/v1.4.0/Release/node-v83-linux-x64/gcstats.node” “–module_name=gcstats” “–module_path=/tmp/bundle/programs/server/npm/node_modules/gc-stats/build/gcstats/v1.4.0/Release/node-v83-linux-x64” “–napi_version=8” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v83”
gyp ERR! cwd /tmp/bundle/programs/server/npm/node_modules/gc-stats
gyp ERR! node -v v14.21.4
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute ‘/opt/Rocket.Chat/.nvm/versions/node/v14.21.4/bin/node /opt/Rocket.Chat/.nvm/versions/node/v14.21.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/bundle/programs/server/npm/node_modules/gc-stats/build/gcstats/v1.4.0/Release/node-v83-linux-x64/gcstats.node --module_name=gcstats --module_path=/tmp/bundle/programs/server/npm/node_modules/gc-stats/build/gcstats/v1.4.0/Release/node-v83-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83’ (1)
node-pre-gyp ERR! stack at ChildProcess. (/tmp/bundle/programs/server/npm/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1088:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
node-pre-gyp ERR! System Linux 6.1.0-20-amd64
node-pre-gyp ERR! command “/opt/Rocket.Chat/.nvm/versions/node/v14.21.4/bin/node” “/tmp/bundle/programs/server/npm/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build”
node-pre-gyp ERR! cwd /tmp/bundle/programs/server/npm/node_modules/gc-stats
node-pre-gyp ERR! node -v v14.21.4
node-pre-gyp ERR! node-pre-gyp -v v1.0.9
node-pre-gyp ERR! not ok
Failed to execute ‘/opt/Rocket.Chat/.nvm/versions/node/v14.21.4/bin/node /opt/Rocket.Chat/.nvm/versions/node/v14.21.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/bundle/programs/server/npm/node_modules/gc-stats/build/gcstats/v1.4.0/Release/node-v83-linux-x64/gcstats.node --module_name=gcstats --module_path=/tmp/bundle/programs/server/npm/node_modules/gc-stats/build/gcstats/v1.4.0/Release/node-v83-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83’ (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gc-stats@1.4.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gc-stats@1.4.0 install 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! /opt/Rocket.Chat/.npm/_logs/2024-04-23T07_43_35_549Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! meteor-dev-bundle@ install: node npm-rebuild.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the meteor-dev-bundle@ install 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! /opt/Rocket.Chat/.npm/_logs/2024-04-23T07_43_35_597Z-debug.log

Whatever. Fall back to dev guide.

Aaaaaand brick wall again.

@rocket.chat/logger:dev: ERROR: command finished with error: command (/opt/Rocket.Chat/Rocket.Chat/packages/logger) /tmp/xfs-753c85dc/yarn run dev exited (129)

@rocket.chat/logger#dev: command (/opt/Rocket.Chat/Rocket.Chat/packages/logger) /tmp/xfs-753c85dc/yarn run dev exited (129)

ERROR run failed: command exited (129)

Great.

Extracting bundle from docker image, digging node 14.21.4 from meteor sites, set proper enviroment variables - it works.

How nice /s.

/Edit

It isn’t the ‘preferred method’ as it is usually trickier to install an maintain. You also have to install, configure and maintain your own proxy server etc etc,

Proxy installing is a problem, but setting up dev environment is easy?

I had to give up my original native installs on my server years back because some packages were no longer supported natively - node issues, of which there are many. I moved to docker and it was not an issue thereafter.

So you gave up and you are unaware of the stae of native instals. OK.

The simplest install methods are snaps and docker and it saves a lot of support cycles deploying this way.

To install, probably. To maintain and debug problems - not so much. I lost a day to find out auto-updated traefik is causing constant disconnected an cpu load to the VM.

Please don’t take your frustrations out on me. I am no longer staff. Just a community person and the messenger.

I answered your original comment which was:

That is not the same as “How do I set up a development environment”

So you created yourself a bit of an XY problem.

The XY Info problem

The answer to that is to read docs which would lead you via the Developer Docs link to this:

However, I don’t dispute that a lot of the docs are out of date and a mess. That isn’t my fault. Open a documentation bug.

Because you do, and probably worth while trying to understand that before you go much further… IIRC it compiles and runs on the fly, and allows you to modify on the fly, rather than a pre compiled binary which can’t.

Devuan - yup I have one and follow them ever since they forked. But it probably won’t be easy to run on it. Not my choice, but the way it is.

You are conflating scenarios.

See what I said at the start - you didn’t ASK about a dev environment. If you had I would have answered that accordingly.

Who said I was unaware? I answered your question. Not what you thought you asked.

I just said it was easier to use docker for a standard install than the precompiled binary which still had a lot of dependencies, and can be flaky as hell with node. YMMV. Not the same as a development install which is multiple times trickier in different ways.

I’ll say again - I answered the question you asked, not the one you thought you asked.

Yup that’s probably the reason. Particularly above when you don’t understand why you might need meteor and yarn.

FWIW many years ago I wrote this section for your sort of scenario (and it probably needs some updating):

Still Stuck?

The links to “How to Report Bugs Effectively” and “How to ask a smart question that will attract attention” are well worth a read.

I may not have all the answer to all your questions immediately, but you have no idea who I may know. So keeping a slightly more civil tone to your posts may get you more sympathy and help.

If it looked like I’m taking it on you, sorry that wasn’t my intent. It was directed to that sort of “development”. Where even the basic scenario of standalone installation is not tested properly(if at all) because “It works on my computer”.

As I said I’ve tested it on Debian on which everything is supposed to be supported out of the box. With same behavior.

Did I’ve made mistakes. Yes a lot of. I’m not complaining about any of them. This results are reproducible 100%. Checked 3 times.

Should I fill in bug reports. Probably. But while I’m waiting for replies I have to have working instance for my colleagues. Probably you’ll say that I should get “Pro” and email support. And you’ll be right. AFAIK we are paying for “Pro”. But as our company was presently bought out, getting to the email that has support will take triple the time to get proper answer on community forum.

So when I get rid of my frustration and most importantly have some free time i"ll write a bug report.

If my junky solutions holds till then, and if management push to use teams is held on.

I understand your frustrations but some of that is in your own hands.

As I said - asking the right question will elicit a more accurate response.

You would have been better asking a new question that accurately reflected your issue.

You should have been able to install the right version of node with n or nvm

Here under package manager (nvm) can see it is probably 14.21.3

This guide should have worked.

If it didn’t then please state the exact steps you took so we can replicate it.

Bugs for the dev docs should go here: