Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Warnings/Errors on npm install and npm run dev #42397
    ccziriak
    Participant

    Hey Zac,

    2. I deleted the node_modules folder and ran npm init. It recreated the package.json file exactly the same as it was in the original downloaded course files, with no errors.

    3. I was able to get this corrected – see #4.

    4. I wasn’t sure where in my system NODE_ENV was getting set to production – spent a lot of time googling/trying to figure that out. Thought maybe it was from Atom since that created some other environment variables related to node, but I completely uninstalled Atom and was still seeing the same thing. Looks like I just needed to reboot my system to reinitialize. Once I did that, NODE_ENV is no longer set (echo $NODE_ENV returns nothing) and it looks like everything is working.

    5. I am able to make changes in the JS now and see them picked up and recompiled.

    Thanks for your help in troubleshooting!

    in 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.

    in reply to: Warnings/Errors on npm install and npm run dev #42321
    ccziriak
    Participant

    Still hoping Zac will stop by and provide some assistance here. I haven’t gone any further with the course since using the modern dev tools is a big part of the reason I signed up for it to begin with.

Viewing 3 posts - 1 through 3 (of 3 total)