Deployment failed with "rw deploy netlify"

Locally everything runs great but when netlify wants do deploy my latest changes it gets the following error:

rw deploy netlify
bash: /opt/build/repo/node_modules/.bin/rw: Permission denied

My guess is that some packages or updates have something to do with it:

  "private": true,
  "workspaces": {
    "packages": [
  "devDependencies": {
    "@redwoodjs/core": "^2.2.4",
    "storybook-tailwind-dark-mode": "^1.0.12"
  "eslintConfig": {
    "extends": "@redwoodjs/eslint-config",
    "root": true
  "engines": {
    "node": ">=14.19 <=16.x",
    "yarn": ">=1.15"
  "prisma": {
    "seed": "yarn rw exec seed"
  "packageManager": "yarn@3.2.1",
  "dependencies": {
    "@tailwindcss/line-clamp": "^0.4.0",
    "i18next": "^21.9.0",
    "i18next-browser-languagedetector": "^6.1.5",
    "i18next-http-backend": "^1.4.1",
    "react-i18next": "^11.18.3",
    "storybook-react-i18next": "^1.1.2"

I hope someone on here can help me out

Hey Gamesearch! Welcome :slight_smile:

My first thoughts are to double check and confirm that you have run all of the commands and have set up the env. variables correctly.

Check this Environment Variables Doc to check your redwood.toml (recommended) settings, perhaps pay close attention to this:

  includeEnvironmentVariables = ['SECRET_API_KEY', 'ANOTHER_ONE']

And it doesn’t hurt to start at the beginning of Chapter 4 Deployment and make sure you hit every step.

Permission denied seems like a user/auth issue… in the tutorial deploy guide they mention generating a secret, and then copying that as an env var to your netlify site settings.

We want to unblock you here, so please shoot back if nothing here helps.

Hey PantheRedEye and thank you very much for your help!

It seems that

yarn rw setup deploy netlify

has fixed my problem as it modified some files with new options and edited others. It works now without an error occuring =)

1 Like