I'm trying to build a react app on CircleCI which until recently I've had no issues with. I'm now getting the following error whenever I attempt an npm run build
from my circle.yml:
#!/bin/bash -eo pipefail
npm run build
> jobcatcher-web@0.0.1 build /home/circleci/repo
> react-scripts build
/home/circleci/repo/node_modules/dotenv-expand/lib/main.js:8
var key = match.replace(/\$|{|}/g, '')
^
RangeError: Maximum call stack size exceeded
at String.replace (<anonymous>)
at /home/circleci/repo/node_modules/dotenv-expand/lib/main.js:8:23
at Array.forEach (<anonymous>)
at interpolate (/home/circleci/repo/node_modules/dotenv-expand/lib/main.js:7:13)
at /home/circleci/repo/node_modules/dotenv-expand/lib/main.js:14:18
at Array.forEach (<anonymous>)
at interpolate (/home/circleci/repo/node_modules/dotenv-expand/lib/main.js:7:13)
at /home/circleci/repo/node_modules/dotenv-expand/lib/main.js:14:18
at Array.forEach (<anonymous>)
at interpolate (/home/circleci/repo/node_modules/dotenv-expand/lib/main.js:7:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jobcatcher-web@0.0.1 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jobcatcher-web@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/circleci/.npm/_logs/2018-03-14T20_57_45_719Z-debug.log
Exited with code 1
I've tried adding/re-added dotenv-expand dependencies as well as any environmental variables I'm using on CircleCI but with no luck.
Any suggestions? Thanks.