RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
39.95k stars 10.3k forks source link

Rocketchat error when installing dependencies #25720

Open amirAlamian opened 2 years ago

amirAlamian commented 2 years ago

Description:

Hi I am using rocketchat source code and when I go to apps/meteor folder to install dependencies with meteor npm install command, this error shows up:

> meteor npm install
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:^

I did the yarn command in project root directory before running this command. I check the package,json file and I notice that the problem might be for this packages:

        "@rocket.chat/eslint-config": "workspace:^",
        "@rocket.chat/livechat": "workspace:^",

What is the solution?

Server Setup Information:

cuongnn-smartosc commented 1 year ago

Is there any updates on this issue? Thanks

TBG-FR commented 1 year ago

The only thing working is using meteor yarn install instead of meteor npm install

But it looks like yarn doesn't build all modules then... In many of them the dist folder is missing and I need to manually do a npm install in them 😵

Examples

Error: Cannot find module '/usr/src/app/apps/meteor/node_modules/@rocket.chat/agenda/dist/index.js'. Please verify that the package.json has a valid "main" entry

Error: Cannot find module '/usr/src/app/apps/meteor/node_modules/@rocket.chat/presence/dist/packages/presence/src/Presence.js'. Please verify that the package.json has a valid "main" entry` 

I will update this issue if I find a better way to handle this

wreiske commented 1 year ago

I was missing a yarn build before trying to start the server.

Documentation here: https://developer.rocket.chat/rocket.chat/rocket-chat-environment-setup/mac-osx

yarn build
yarn dev
idhowardgj94 commented 1 year ago

@wriske's method worked. I believe that linux version of rocket-chat-environment-setup missing the yarn build step.

but the source code already fix it.

idhowardgj94 commented 1 year ago

doc in https://developer.rocket.chat/rocket.chat/rocket-chat-environment-setup/linux image

source code https://github.com/RocketChat/developer-docs/blob/master/rocket.chat/rocket.chat-server/linux.md