Read-only file system, mkdir /node_modules

Hey, guys!

I’m trying to deploy my rails 7 app with tailwind and esbuild. Locally I run it with Dockerfile and docker-compose.

But I receive this error on render:

error Error: EROFS: read-only file system, mkdir '/node_modules'
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
rails aborted!
jsbundling-rails: Command install failed, ensure yarn is installed
Tasks: TOP => assets:precompile => javascript:build => javascript:install
(See full trace by running task with --trace)

Any ideas?

I see that you’ve already initiated a support ticket with us. To avoid any confusion or duplicate efforts, let’s continue the conversation there

Jérémy.
Render Support, UTC+3

1 Like

Thanks for the support, Jeremy.

Just sharing the solution with everybody, my assets.rb was adding “/node_modules” to the assets path. So, it was trying to create the node_modules in the root, which is not allowed.

I just removed the “/” and it worked, now creating the folder in ~/project/src.