vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.21k stars 1.81k forks source link

Vercel: Trying to install "turbo-linux-64" using npm EACCES: permission denied #390

Closed abusada closed 2 years ago

abusada commented 2 years ago

What version of Turborepo are you using?

1.0.19

Describe the Bug

I'm following this guide https://vercel.com/docs/concepts/git/monorepos#turborepo Trying to deploy an app on vercel, the app is inside a monorepo that is generated with turbo cli.

I have changed the BUILD COMMAND to:

cd ../.. && npx turbo run build --scope=@scope/app --includeDependencies --no-deps

And I get the following output: screenshot- 2021-12-21 at 10 04 49@2x

Expected Behavior

The expected behavior is of course that following this guide should simply work.

To Reproduce

goellner commented 2 years ago

same issue here since today, no idea how to fix this one or if it is on Vercel side to fix.

joshsny commented 2 years ago

Also experiencing this issue as of today. Not sure how to fix this either.

lukebussey commented 2 years ago

I’m also experiencing the same issue.

I can get past it with the following install command

npm install turbo@latest && npm install

But then I run into the next issue:

web:build: error TS6053: File 'tsconfig/nextjs.json' not found.
goellner commented 2 years ago

i solved by removing all package-lock.json files. now it builds with yarn instead of npm and it works again

abusada commented 2 years ago

I confirm that using yarn instead of npm fixed the issue

lukebussey commented 2 years ago

Also confirmed. Removed the package-lock.json and changed the build command to:

cd ../.. && yarn turbo run build --scope=web --includeDependencies --no-deps
joshsny commented 2 years ago

Running cd ../.. && yarn turbo run build --scope=web --includeDependencies --no-deps

is giving me the error

Command "turbo" not found

when deploying to Vercel, but working locally. Am I making a silly mistake here?

lukebussey commented 2 years ago

@joshsny In your turborepo project root, make sure you've run yarn install. That fixed that error for me.

jaredpalmer commented 2 years ago

This is fixed in turbo@canary

jaredpalmer commented 2 years ago

This is now released in turbo@latest.

SORRRY for the headaches!

ihadabs commented 2 years ago

Same here ... It runs locally but not on Vercel.

Build stopes with an error: docs:build: error TS6053: File 'tsconfig/nextjs.json' not found.


Edit I re-created the monorepo with yarn and it worked.

Full Vercel logs:

Cloning completed: 1.406s
--
19:48:03.644 | Analyzing source code...
19:48:04.214 | Installing build runtime...
19:48:07.506 | Build runtime installed: 3.292s
19:48:09.718 | No Build Cache available
19:48:10.432 | Installing dependencies...
19:48:10.435 | Detected `package-lock.json` generated by npm 7...
19:48:25.704 |  
19:48:25.704 | added 402 packages in 15s
19:48:25.705 |  
19:48:25.705 | 65 packages are looking for funding
19:48:25.705 | run `npm fund` for details
19:48:25.728 | Detected Next.js version: 12.0.3
19:48:25.924 | Running "cd ../.. && npx turbo run build --scope=docs --includeDependencies --no-deps"
19:48:29.260 | • Packages in scope: docs
19:48:29.260 | • Remote computation caching enabled (experimental)
19:48:29.260 | • Running build in 1 packages
19:48:29.742 | docs:build: cache miss, executing f29a2c64e148c9c9
19:48:29.966 |  
19:48:29.966 | docs:build: > docs@0.0.0 build /vercel/path0/apps/docs
19:48:29.966 | docs:build: > next build
19:48:29.966 |  
19:48:30.694 | docs:build: Attention: Next.js now collects completely anonymous telemetry regarding usage.
19:48:30.694 | docs:build: This information is used to shape Next.js' roadmap and prioritize features.
19:48:30.695 | docs:build: You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
19:48:30.695 | docs:build: https://nextjs.org/telemetry
19:48:30.695 |  
19:48:30.739 | docs:build: info  - Checking validity of types...
19:48:30.997 | docs:build: error TS6053: File 'tsconfig/nextjs.json' not found.
19:48:30.997 |  
19:48:30.997 | docs:build: npm ERR! code ELIFECYCLE
19:48:30.997 | docs:build: npm ERR! errno 1
19:48:30.998 | docs:build: npm ERR! docs@0.0.0 build: `next build`
19:48:30.998 | docs:build: npm ERR! Exit status 1
19:48:30.998 | docs:build: npm ERR!
19:48:30.998 | docs:build: npm ERR! Failed at the docs@0.0.0 build script.
19:48:30.998 | docs:build: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
19:48:30.998 |  
19:48:30.998 | docs:build: npm ERR! A complete log of this run can be found in:
19:48:30.998 | docs:build: npm ERR!     /vercel/.npm/_logs/2021-12-23T16_48_30_987Z-debug.log
19:48:30.998 | docs:build: Error: command finished with error: exit status 1
19:48:31.000 | Command failed: /vercel/.npm/_npx/401/lib/node_modules/turbo/node_modules/turbo-linux-64/bin/turbo run build --scope=docs --includeDependencies --no-deps
19:48:31.012 | Error: Command "cd ../.. && npx turbo run build --scope=docs --includeDependencies --no-deps" exited with 1