OpenZeppelin / openzeppelin-upgrades

Plugins for Hardhat and Foundry to deploy and manage upgradeable contracts on Ethereum.
MIT License
604 stars 254 forks source link

Support read-only file systems #651

Open iners-max opened 1 year ago

iners-max commented 1 year ago

https://github.com/OpenZeppelin/openzeppelin-upgrades/blob/e914ea305bdb4e9bd1afd917ba2a223dc1d9c0ff/packages/plugin-hardhat/src/utils/validations.ts#L14

I believe the error is caused by the above function. I am using Google App Engine to host my deploy function (which will deploy an upgradable contract to Matic). It works fine with I tested in in my local Mac environment. However, when I trigger the login in Google App Engine, I see this error. I would like to ask if there is any solution for this?

[Error: EROFS: read-only file system, mkdir '/workspace/cache/validations.json.lock'] {
 errno: -30,
code: 'EROFS',
syscall: 'mkdir',
path: '/workspace/cache/validations.json.lock'
}
frangio commented 1 year ago

The plugin needs a writable file system at the moment.

GFialho commented 1 year ago

Is there a way to change the folder instead? For example, instead of creating on "/workspace/cache/validations.json.lock", create on "/workspace/tmp/validations.json.lock"