LambCI cant create optimised production build
Dylanb-dev opened this issue · comments
I am using lambCI with create-react-app it always errors on npm run build with error code 1, any ideas on what may be causing this? I suspect root access but cannot be sure, npm install and npm test work great.
edit: It was failing on eslint warnings
No idea I'm afraid – I'm going to need more detail. What's happening when the error occurs? What are the details of the error? Is it trying to write somewhere on the filesystem that it doesn't have permissions?
Sorry it is just a generic error message, here is my test repo.
Here is the example, although it appears to be working for now so I will close this issue.
Thanks for the quick reply!
Glad you got it working!
The default command is npm install && npm test
. If you want npm install && npm run build
, then this should work in your package.json:
"lambci": {
"cmd": "npm install && npm run build"
}
Actually you are right but there is a weird error when using that command.
example: Dylanb-dev/lambci-CRA#7
Also for anyone checking this for future reference it was failing on eslint warnings.
example: Dylanb-dev/lambci-CRA#6
Interesting – it looks like it might be running out of disk space perhaps? Lambda only allows 500MB at the moment (can't wait for Amazon to increase this!)
I think so too however using nave is successful as you can see so it makes me wonder about permissions or npm version.
@lolcookie right, it may be that npm v2 isn't de-duping the modules it installs as well as npm v3, so is using more space
I'm actually considering upgrading the npm included in LambCI to npm v4 – and possibly even including yarn
as well. Just need to be careful not to increase the size too much, and I don't want to break anyone's builds.