How come my workspace is not recognized?
salieflewis
PROOP

a year ago

npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*
Solved$10 Bounty

45 Replies

salieflewis
PROOP

a year ago

fbc83639-6b3a-48e2-8aa0-9c016d399bc7


a year ago

try using pnpm as a package manager instead (or bun or yarn or whatever, ive never gotten npm to work with workspaces)


salieflewis
PROOP

a year ago

I’m using bun


a year ago

are you using Dockerfile?

if not can you send me your build logs?


salieflewis
PROOP

a year ago

Sure let me share


salieflewis
PROOP

a year ago

I'm not using a dockerfile... or there is no dockerfile within my monorepo


salieflewis
PROOP

a year ago

1392504496650719422


a year ago

it's using npm <:Thinking:1360710341239242762>


salieflewis
PROOP

a year ago

Hmm


salieflewis
PROOP

a year ago

Using Railpack btw


a year ago

perfect, then can you show me the top-most part of your build logs?


salieflewis
PROOP

a year ago

I screenshotted everything that was under 'Build Logs'


salieflewis
PROOP

a year ago

Oh I see


salieflewis
PROOP

a year ago

One sec


salieflewis
PROOP

a year ago

1392505835405443162

1392505835845980170


a year ago

do you have bun specified as your package manager in your package.json?


salieflewis
PROOP

a year ago

{
  "name": "river",
  "private": true,
  "scripts": {
    "start": "(cd apps/expo && bun start) & (cd apps/backend && bun start:dev)",
    "start:beam": "cd apps/beam && bun start",
    "lint": "biome check . --write",
    "format": "biome format . --write",
    "typecheck": "cd apps/expo && bun typecheck",
    "prepare": "husky"
  },
  "workspaces": ["apps/*", "packages/*"],
  "devDependencies": {
    "husky": "^9.1.7"
  }
}

salieflewis
PROOP

a year ago

I have a bun.lock file in the root of the monorepo.. so it should know


a year ago

yea its weird that it's using npm anyway


a year ago

can you try setting your package manager to bun in package.json? maybe that'll make it use bun


salieflewis
PROOP

a year ago


a year ago

did you alter the root directory for your service in your service settings?


salieflewis
PROOP

a year ago

Yes, its pointed to my backend


a year ago

oh okay yea then that's your problem


a year ago

that's only done on isolated monorepos


a year ago

for shared monorepos you deploy the entire repo but alter the start command to point to start whatever app needs to start within the service so that each service runs a different app in the monorepo


salieflewis
PROOP

a year ago

What do you mean, whats the difference?


salieflewis
PROOP

a year ago

But I can still have my watch paths set appropriately?


a year ago

an isolated monorepo is a monorepo where each repo is completely isolated from the others, meaning no shared folder or packages or anything, each one runs indepedently


a year ago

a shared monorepo is what you have, might have a shared directory, it shares dependencies and such


a year ago

yea


salieflewis
PROOP

a year ago

Ok, will try that


salieflewis
PROOP

a year ago

Thank you


salieflewis
PROOP

a year ago

That seemed to work! Thanks so much


salieflewis
PROOP

a year ago

Do you know why these scripts appear as errors?

1392510496367841341


a year ago

I am not sure


a year ago

it's probably fine though


salieflewis
PROOP

a year ago

Yeah its fine was just a tiny bit bothersome


a year ago

i can imagine


a year ago

all good then? clear to mark as solved?


salieflewis
PROOP

a year ago

Yes!


salieflewis
PROOP

a year ago

Although one further question if you're still around


a year ago

sure what's up?


a year ago

Feel free to open up another thread if you still want to ask your question


a year ago

!s


Status changed to Solved dev 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...