Npm install failure?

Hello All, I am trying to find the root cause of this issue, apparently, Netlify installs all my npm dependencies correctly but once it is building my project, Netlify is not able to find any “installed” dependency.

Build script defined in my package.json:
“build”: “npm run build:del && npm run build:js && npm run build:static && npm run build:server”,

Logs:
10:46:21 AM: Installing NPM modules using NPM version 6.11.3
10:46:32 AM: added 53 packages from 38 contributors and audited 306985 packages in 9.402s
10:46:32 AM: found 1 low severity vulnerability
10:46:32 AM: run npm audit fix to fix them, or npm audit for details
10:46:32 AM: NPM modules installed
10:46:32 AM: Started restoring cached go cache
10:46:32 AM: Finished restoring cached go cache
10:46:32 AM: unset GOOS;
10:46:32 AM: unset GOARCH;
10:46:32 AM: export GOROOT=’/opt/buildhome/.gimme/versions/go1.12.linux.amd64’;
10:46:32 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
10:46:32 AM: go version >&2;
10:46:32 AM: export GIMME_ENV=’/opt/buildhome/.gimme/env/go1.12.linux.amd64.env’;
10:46:32 AM: go version go1.12 linux/amd64
10:46:32 AM: Installing missing commands
10:46:32 AM: Verify run directory
10:46:32 AM: Executing user command: npm run build
10:46:32 AM: > nullform@0.1.0 build /opt/build/repo
10:46:32 AM: > npm run build:del && npm run build:js && npm run build:static && npm run build:server
10:46:33 AM: > nullform@0.1.0 build:del /opt/build/repo
10:46:33 AM: > del-cli dist
10:46:33 AM: sh: 1: del-cli: not found
10:46:33 AM: npm
10:46:33 AM: ERR! code ELIFECYCLE

Do I miss something here? It was working fine two days ago.
Thanks in advance :slight_smile:

I suspect you don’t have del-cli in your package.json as a dependency. Note that we use NODE_ENV=development by default so we should install devDependencies from there, but in case you have that installed globally on your own machine, that won’t work here - you have to include all dependencies in your package.json :slight_smile: since we start from 0 every build.

1 Like

Hello Fool,
Actually I found the issue and you are right, I overrode NODE_ENV intentionally.
Thanks for clarifying the default value, now I am using BUILD_ENV=production to avoid future conflicts with my webpack configuration.

Best,
Ae

1 Like