Gustavo
08/22/2022, 4:56 AMuser group permissions folder
myUser nogroup drwx-r-xr-x src
myUser nogroup drwx-r-xr-x node_modules/prisma
myUser nogroup drwx-r-xr-x node_modules/.prisma
myUser nogroup drwx-r-xr-x node_modules/@prisma
the api I have is executed by the user: `myUser`on startup, and it also runs a separated script as a child process to run migrations from, but i get the error:
Can't write to /application/node_modules/prisma please make sure you install "prisma" with the right permissions.
which makes me think I should add the w
permission to prisma folders?
RUN chmod -R o+w /application/node_modules/.prisma /application/node_modules/@prisma /application/node_modules/prisma
the script i'm using to run migrations looks like:
const cmd1 = spawnSync('npx', ['prisma', 'generate', `--schema=${prismaSchema}`]);
console.log('cmd1: ', cmd1.stdout.toString('utf8'), cmd1.stderr.toString('utf8'));
const cmd2 = spawnSync('npx', ['prisma', 'migrate', 'deploy', `--schema=${prismaSchema}`]);
console.log('cmd2: ', cmd2.stdout.toString('utf8'), cmd2.stderr.toString('utf8'));
Could someone guide me here? ๐
All of these is running in a ECS container, any help is highly appreciated ๐Nurul
08/22/2022, 10:48 AMnode_modules
Can you please give the current user permission to write to node_modules
?
Command:
chown <group/user>:<user> /path/to/node_modules
Alternatively, you could use a custom output path to specify a location to which the current user could write, this wonโt require executing any command to change owner or modifying any permissionsGustavo
08/22/2022, 11:22 AMNurul
08/22/2022, 11:24 AM