leemunroe / grunt-email-workflow

A Grunt workflow for designing and testing responsive HTML email templates with SCSS.
MIT License
3.05k stars 339 forks source link

grunt serve command not working #112

Closed thomasbritton closed 4 years ago

thomasbritton commented 4 years ago

When I run grunt serve it gives me the following error:

Loading "express.js" tasks...ERROR
>> TypeError: os.tmpDir is not a function
Warning: Task "express" not found. Use --force to continue.

Aborted due to warnings.

Any ideas? I am on Windows 10.

Thanks

taeo commented 4 years ago

Hey @thomasbritton

Try deleting your node_modules folder, then re-installing npm install.

If that's not working for some reason, can you try giving this branch a run fix/2020-07-package-audit

thomasbritton commented 4 years ago

Hey @taeo

I've just tried using the branch as suggested and it reports back with the same error message as first reported.

leemunroe commented 4 years ago

@thomasbritton I'm seeing same issue after upgrading to Node 14.8.0

@taeo Tried your branch and got the same issue.

The dependency versions looked up to date in that branch. It wasn't obvious to me where the issue is. I didn't have time to dig in further.

thomasbritton commented 4 years ago

@leemunroe I'm on Node 14.5.0

taeo commented 4 years ago

@leemunroe and @thomasbritton

Ok. Definitely a node version issue. In general, good practice to run LTS versions (at this time that's v10 and v12).

Code updates not withstanding, here's the fix process to get running (see related commit).

  1. Install Node Version Manager (NVM) - Mac / Linux vs Windows
  2. nvm install lts/Erbium - Install 12x node version
  3. nvm use - will set correct node version
  4. rm -rf node_modules - clean house
  5. npm install - ensure clean npm packages for corrected node version
  6. Run your scripts as usual
leemunroe commented 4 years ago

Yes this worked for me. Thanks @taeo!

tl;dr don't use 14.x yet (release schedule)

thomasbritton commented 4 years ago

@taeo works great now!

Thanks