foundation / foundation-emails

Quickly create responsive HTML emails that work on any device and client. Even Outlook.
https://get.foundation/emails/docs/
MIT License
7.77k stars 1.09k forks source link

npm install fails to run #1055

Closed mtsweir closed 3 years ago

mtsweir commented 3 years ago

How can we reproduce this bug?

git clone https://github.com/zurb/foundation-emails-template project
cd project
npm install

What did you expect to happen? Install all project files as required to run this project.

What happened instead? When I run npm install I get this message in the console:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'xmlbuilder@2.2.1',
npm WARN EBADENGINE   required: { node: '0.8.x || 0.10.x' },
npm WARN EBADENGINE   current: { node: 'v15.1.0', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN deprecated gulp-uncss@1.0.6: Use UnCSS through gulp-postcss instead.
npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated mimelib@0.2.19: This project is unmaintained
npm WARN deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated mailcomposer@0.2.12: This project is unmaintained
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated wreck@6.3.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated request@2.36.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated gulp-util@2.2.20: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated phantomjs-prebuilt@2.1.16: this package is now deprecated
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what'
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated nodemailer@0.7.1: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated har-validator@2.0.6: this library is no longer supported
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.69.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated hawk@1.0.0: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select'
npm WARN deprecated highlight.js@8.9.1: Version no longer supported. Upgrade to @latest
npm WARN deprecated lodash-node@2.4.1: This package is discontinued. Use lodash@^4.0.0.
npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! code 1
npm ERR! path /Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/Cellar/node/15.1.0/bin/node /Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/usr/local/Cellar/node/15.1.0/bin/node',
npm ERR! gyp verb cli   '/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@15.1.0 | darwin | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` succeeded python2 /usr/bin/python2
npm ERR! gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.16
npm ERR! gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 15.1.0
npm ERR! gyp verb command install [ '15.1.0' ]
npm ERR! gyp verb install input version string "15.1.0"
npm ERR! gyp verb install installing version: 15.1.0
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 15.1.0
npm ERR! gyp verb build dir attempting to create "build" dir: /Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-sass/build
npm ERR! gyp verb build dir "build" dir needed to be created? /Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-sass/build
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp verb build/config.gypi writing out config file: /Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-sass/build/config.gypi
npm ERR! gyp verb config.gypi checking for gypi file: /Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-sass/config.gypi
npm ERR! gyp verb common.gypi checking for gypi file: /Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-sass/common.gypi
npm ERR! gyp verb gyp gyp format was not specified; forcing "make"
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-sass/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/maxweir/.node-gyp/15.1.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/maxweir/.node-gyp/15.1.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/maxweir/.node-gyp/15.1.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-sass',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR! 
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
npm ERR! 
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
npm ERR! 
npm ERR! gyp: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-gyp/lib/configure.js:345:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:327:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
npm ERR! gyp ERR! System Darwin 20.3.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/15.1.0/bin/node" "/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/Newsletters-2.0/ddcnewsletters/node_modules/node-sass
npm ERR! gyp ERR! node -v v15.1.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok 
npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/maxweir/.npm/_logs/2021-04-06T22_01_37_604Z-debug.log

Does npm start work? This is what I get in the console when running npm start.

Maxs-MacBook-Pro:newsletters-2 maxweir$ npm start

> foundation-emails-template@1.0.0 start
> gulp

[10:27:06] Failed to load external module @babel/register
[10:27:06] Error: Cannot find module '@babel/register' from '/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/newsletters-2'
[10:27:06] Failed to load external module babel-register
[10:27:06] Error: Cannot find module 'babel-register' from '/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/newsletters-2'
[10:27:06] Failed to load external module babel-core/register
[10:27:06] Error: Cannot find module 'babel-core/register' from '/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/newsletters-2'
[10:27:06] Failed to load external module babel/register
[10:27:06] Error: Cannot find module 'babel/register' from '/Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/newsletters-2'
[10:27:06] Local modules not found in ~/Documents/_Clients/ClientName/ddcnewsletter/newsletters-2
[10:27:06] Try running: npm install
npm ERR! code 1
npm ERR! path /Users/maxweir/Documents/_Clients/ClientName/ddcnewsletter/newsletters-2
npm ERR! command failed
npm ERR! command sh -c gulp

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/maxweir/.npm/_logs/2021-04-06T22_27_06_058Z-debug.log
DanielRuf commented 3 years ago

gyp: No Xcode or CLT version detected!

This is not a problem with foundation-emails but the missing Xcode development kit on your macbook.

Please check the available solutions at https://www.google.com/search?client=firefox-b-d&q=%22gyp%3A+No+Xcode+or+CLT+version+detected%21%22

According to the kernel version 20, you use Big Sur. So this might be relevant for you: https://allanphilipbarku.medium.com/gyp-no-xcode-or-clt-version-detected-macos-big-sur-anansewaa-com-7fe936ee1623

mtsweir commented 3 years ago

Thankyou, solution 2 worked in the using the second link you posted.