-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: EACCES: permission denied, scandir '/home/testuser/myapp/docker/data/db' #5403
Comments
Hello @masterbater (nice username) - Redwood generates and writes types for you when you run either the dev server, or You'll need to give write access to the following directories:
That should get rid of the access error! Let us know if this helps :) |
I created a new folder docker in the root directory of a redwood project.
Some files inside it is only readonly.
What I noticed is running any cli like yarn rw dev , rw g made me encounter
this error.
Maybe its possible to exclude this folder with the scandir? I did find a
solution for this instead of mounting readonly in docker-compose config I
just copy the config in Dockerfile commands.
…On Tue, May 3, 2022, 12:44 AM Daniel Choudhury, ***@***.***> wrote:
Hello @masterbater <https://github.com/masterbater> (nice username) -
Redwood generates and writes types for you when you run either the dev
server, or yarn rw g types into a few places.
You'll need to give write access to the following directories:
- .redwood (and all sub directories)
- ./web/types
- ./api/types
That should get rid of the access error! Let us know if this helps :)
—
Reply to this email directly, view it on GitHub
<#5403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGI6VFGQI4W5UWB7GFYZAZ3VIAA6FANCNFSM5U3ZFPVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yeah - because Ok to close out the issue? |
Yes you can close this issue, the error doesnt really block the intended
behavior there is only error showing up
…On Wed, May 4, 2022, 1:25 AM Daniel Choudhury, ***@***.***> wrote:
Yeah - because yarn rw g actually generates files to write to the FS,
makes sense that readonly mode would throw an error.
Ok to close out the issue?
—
Reply to this email directly, view it on GitHub
<#5403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGI6VFE7TTB7HEOO7NRZKVLVIFORHANCNFSM5U3ZFPVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Feels like this was closed in a hasty manner. I think this is a flaw where there should be folder redwoodjs should be allowed to ignore. |
@kennethtxytqw If you're still interested in this more discussion is happening in #7761 and you're more than welcome to join in 🙂 |
Hello is there anyway we could exclude a folder from scandir, I mounted some files to my container in readonly mode and I got this error message when running yarn rw g types
`
Generating...
node:fs:1392
handleErrorFromBinding(ctx);
^
Error: EACCES: permission denied, scandir '/home/jasonzach/modernsmarthealth/docker/data/db'
at Object.readdirSync (node:fs:1392:3)
at readdirWithFileTypes (/home/jasonzach/modernsmarthealth/node_modules/@nodelib/fs.scandir/out/providers/sync.js:16:33)
at Object.read (/home/jasonzach/modernsmarthealth/node_modules/@nodelib/fs.scandir/out/providers/sync.js:10:16)
at SyncReader.scandirSync [as _scandir] (/home/jasonzach/modernsmarthealth/node_modules/@nodelib/fs.scandir/out/index.js:18:17)
at SyncReader._handleDirectory (/home/jasonzach/modernsmarthealth/node_modules/@nodelib/fs.walk/out/readers/sync.js:28:34)
at SyncReader._handleQueue (/home/jasonzach/modernsmarthealth/node_modules/@nodelib/fs.walk/out/readers/sync.js:23:18)
at SyncReader.read (/home/jasonzach/modernsmarthealth/node_modules/@nodelib/fs.walk/out/readers/sync.js:15:14)
at SyncProvider.read (/home/jasonzach/modernsmarthealth/node_modules/@nodelib/fs.walk/out/providers/sync.js:11:29)
at ReaderSync.walkSync [as _walkSync] (/home/jasonzach/modernsmarthealth/node_modules/@nodelib/fs.walk/out/index.js:20:21)
at ReaderSync.dynamic (/home/jasonzach/modernsmarthealth/node_modules/fast-glob/out/readers/sync.js:13:21) {
errno: -13,
syscall: 'scandir',
code: 'EACCES',
path: '/home/jasonzach/modernsmarthealth/docker/data/db'
}
rw generate types
Generate supplementary code
Options:
--help Show help [boolean]
--version Show version number [boolean]
--cwd Working directory to use (where
redwood.toml
is located.)Error: Command failed with exit code 1: yarn rw-gen
at makeError (/home/jasonzach/modernsmarthealth/node_modules/execa/lib/error.js:60:11)
at Function.module.exports.sync (/home/jasonzach/modernsmarthealth/node_modules/execa/index.js:194:17)
at Object.handler (/home/jasonzach/modernsmarthealth/node_modules/@redwoodjs/cli/dist/commands/generate.js:27:18)
at /home/jasonzach/modernsmarthealth/node_modules/yargs/build/index.cjs:443:71
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
shortMessage: 'Command failed with exit code 1: yarn rw-gen',
command: 'yarn rw-gen',
escapedCommand: '"yarn rw-gen"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}`
The text was updated successfully, but these errors were encountered: