mediacurrent / theme_generator_8

Yeoman generator for Drupal Themes - lets you quickly set up a Drupal 8 theme with sensible defaults and best practices.
MIT License
100 stars 25 forks source link

Latest node (v15.3.0) fails to create theme #80

Closed JEManndy closed 3 years ago

JEManndy commented 3 years ago

Command from the installation instructions: npm create yo mc-d8-theme fails with (now current) node version v15.3.0

It succeeds with node v14.2.0, but the theme generator should be brought up to date with current the node version.

I have attached the npm error as stderr.txt and the log file 2020-11-28T14_20_27_553Z-debug.log. stderr.txt

2020-11-28T14_20_27_553Z-debug.log stderr.txt

widescreenBob commented 3 years ago

Steps taken to replicate:

Create a new folder. Run command nvm install node && node -v > .nvmrc

Run node --version v15.5.1

Run npm --version 6.14.11

Theme generator starts as expected.

It is possible that if the npm version is not current, the generator may fail. Updating npm can be done by running nvm install-latest-npm.

Going to add this step to the readme

Nuuou commented 3 years ago

I believe the issue here may be related to npm@7 rather than node@15.

Ran all of the above (as came here to report the same issue), and noticed if I'm on npm@7, the generator fails. Downgrading to npm@6 fixes this, and generator runs a-okay. Thanks for the nvm install-latest-npm command!

Hopefully this helps someone else who may run into this!

mariohernandez commented 3 years ago

We've addressed this issue by recommending node v14.16.1 along with NPM 6.x. These instructions are found in the README. Thanks for the issue.