JavaScript for WordPress Forums Gutenberg Development Warnings/Errors on npm install and npm run dev Reply To: Warnings/Errors on npm install and npm run dev

#42367
ccziriak
Participant

Hi Zac,

Thanks for the guidance.

1. Yes the cross-env package is listed in the package.json file

2. The command failed before actually creating the node_modules folder in jsforwp-blocks. After doing some further investigation I found that the dev dependencies were not getting loaded – my NODE_ENV environment variable was set to production. I’m not sure what the default is for this or what set it that way, but it seems to be set to production globally on my Mac.

3. I can get npm run dev to execute now if I set NODE_ENV to be something other than production, either by setting it first:

export NODE_ENV=development

or including it with the npm command like so:

NODE_ENV=development npm run dev

So I got the commands to execute and I see Webpack is watching the files, but I’m still trying to figure out what else I have installed that’s setting NODE_ENV=production.