Metadrop / drupal-boilerplate

Drupal projects up and running with Docker and many other tools in minutes
28 stars 23 forks source link

Upgrade Node version #102

Closed albeorte96 closed 1 year ago

albeorte96 commented 1 year ago

Problem

Currently, when installing the project for the first time or when launching a make frontend command once installed, the following error appears:

docker-compose exec -w "/var/www/html/web/themes/custom"/"boilerplate" node sh /var/www/html/scripts/frontend-build.sh dev 
Running ./scripts/frontend-build.sh dev 
npm ERR! code ENOTSUP 
npm ERR! notsup Unsupported engine for radix_subtheme@: wanted: {"npm":">=6.0","node":">=16.0","yarn":">=1.6"} (current: {"node":"14.15.4","npm":"6.14.10"
}) 
npm ERR! notsup Not compatible with your version of node/npm: radix_subtheme@ 
npm ERR! notsup Not compatible with your version of node/npm: radix_subtheme@ 
npm ERR! notsup Required: {"npm":">=6.0","node":">=16.0","yarn":">=1.6"} 
npm ERR! notsup Actual:  {"npm":"6.14.10","node":"14.15.4"} 

npm ERR! A complete log of this run can be found in: 
npm ERR!    /home/node/.npm/_logs/2023-02-14T10_15_52_197Z-debug.log 
ERROR: 1 
make: *** [Makefile:43: frontend] Error 1

Solution

Upgrade Node version >=16 as in Docker4Drupal

albeorte96 commented 1 year ago

I have tested with the new versions and launched the commands:

make frontend dev
make frontend watch

Everything works as expected after upgrading

albeorte96 commented 1 year ago

I have updated the Docker image to version v16 for the moment, as it is the minimum required and version v18 is still unstable.

albefer commented 1 year ago

Make frontend commands have been launched with node version 16. It works as expected.