Vercel: EACCES: mkdir permission denied

Created on 12 Mar 2017  路  3Comments  路  Source: vercel/vercel

I'm deploying express web application with webpack's html webpack plugin, which is generating index.html while webpack is running.
But encountered permission issue below when creating directory 'dist'.
Is there any alternative solution instead of generating files?

> npm ERR! Linux 4.7.0-coreos
> Error: EACCES: permission denied, mkdir '/home/nowuser/src/dist'
> npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "start"
> npm ERR! node v7.6.0
> npm ERR! code ELIFECYCLE
> npm ERR! npm  v4.2.0
> npm ERR! Exit status 1
> npm ERR! 
> npm ERR! Failed at the [email protected] start script 'webpack && node index.js'.

Most helpful comment

We enforce rather strictly separation of build and start for now deployments.

The filesystem should only be modified in scripts.build and application should be started in the scripts.start
In case you don't want to modufy the build and start tasks, you can define a task called now-build. If now-build is set, build is ignored. And similarly for now-start

All 3 comments

Could you generate the files under /tmp?

We enforce rather strictly separation of build and start for now deployments.

The filesystem should only be modified in scripts.build and application should be started in the scripts.start
In case you don't want to modufy the build and start tasks, you can define a task called now-build. If now-build is set, build is ignored. And similarly for now-start

@jamo I extracted 'webpack' command from scripts.start and put it into scripts.build and it works beautifully! Thank you so much.

Was this page helpful?
0 / 5 - 0 ratings