Skip to content
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

yarn start inside a script failed with error Could not write file #8652

Closed
olechnwin opened this issue Jun 23, 2021 · 3 comments
Closed

yarn start inside a script failed with error Could not write file #8652

olechnwin opened this issue Jun 23, 2021 · 3 comments

Comments

@olechnwin
Copy link

Hi,
I am trying to run yarn inside a script as follows:

sbatch --time=10:00 --wrap "singularity exec $momig_frontend_img bash -c 'cd /opt/MoMI-G && yarn start'"

but got this error:

yarn run v1.22.10
$ react-app-rewired start --scripts-version react-scripts-ts
error Could not write file "/opt/MoMI-G/yarn-error.log": "EROFS: read-only file system, open '/opt/MoMI-G/yarn-error.log'"
error An unexpected error occurred: "EROFS: read-only file system, mkdir '/gpfs0'".

However, the following command works:

singularity exec $momig_frontend_img bash -c 'cd /opt/MoMI-G && yarn start'

What do I have to do to run yarn start inside a script?

Thank you in advance for your help.

@iduuck
Copy link

iduuck commented Jun 23, 2021

From which user are you executing the script? And what exactly is singularity? Also, are you sure, the cd Is actually being run? Since both scripts should not work, when the file system is being under „Read-Only“.

@olechnwin
Copy link
Author

Thanks for your help. I'm running the script as a user not root if that's what you're asking. singularity is a container just like docker so I'm running it inside a singularity container which contains its own OS.
I'm pretty sure the cd is being run because I have the yarn installed in /opt/MoMI-G.
That's what confuses me, I thought both commands should not work if the file system is under "Read-only"

@RDIL
Copy link
Member

RDIL commented Sep 7, 2022

Looks like a filesystem error instead of a Yarn error.

@RDIL RDIL closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants