APSL / django-email-foundation

Package for help you to make ease build email templates in your project.
MIT License
5 stars 4 forks source link

Error installing NPM requirements #17

Open fsecada01 opened 4 years ago

fsecada01 commented 4 years ago

It seems likely that one of the requirements via the identified command list from DEF_NODE_PACKAGES_REQUIRED is faulty. I got the following printout when trying to run npm directly from my chosen node modules directory.

(main) C:\dev\Django_Projects\RankedJobs\main\src\frontend>npm  install  gulp@4.0.0  panini@1.3.0  inky@1.3.6  gulp-open@3.0.1  gulp-debug@4.0.0  gulp-load-plugins@1.5.0  gulp-sass@2.3.2  gulp-inline-css@3.3.1  gulp-uncss@1.0.6  node-sass@4.9.3  gulp-imagemin@2.4.0  siphon-media-query@1.0.0  lazypipe@1.0.2  gulp-htmlmin@1.3.0  gulp-replace@0.5.4
npm WARN deprecated gulp-uncss@1.0.6: Use UnCSS through gulp-postcss instead.
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 phantomjs-prebuilt@2.1.16: this package is now deprecated
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
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 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 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 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 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).

> phantomjs-prebuilt@2.1.16 install C:\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip
Saving to D:\Users\mrbub\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
Receiving...
  [===================================-----] 88%
Received 17767K total.
Extracting zip contents
Removing D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\phantomjs-prebuilt\lib\phantom
Copying extracted folder D:\Users\mrbub\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip-extract-1576262059004\phantomjs-2.1.1-windows -> D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\phantomjs-prebuilt\lib\phantom
Writing location.js file
Done. Phantomjs binary available at D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe

> node-sass@3.13.1 install C:\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\gulp-sass\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-72_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@4.9.3 install C:\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> gifsicle@3.0.4 postinstall C:\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\gifsicle
> node lib/install.js

  √ gifsicle pre-build test passed successfully

> jpegtran-bin@3.2.0 postinstall C:\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\jpegtran-bin
> node lib/install.js

  √ jpegtran pre-build test passed successfully

> optipng-bin@3.1.4 postinstall C:\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\optipng-bin
> node lib/install.js

  √ optipng pre-build test passed successfully

> node-sass@3.13.1 postinstall C:\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\gulp-sass\node_modules\node-sass
> node scripts/build.js

Building: C:\Languages\NodeJs\node.exe D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'C:\\Languages\\NodeJs\\node.exe',
gyp verb cli   'D:\\Users\\mrbub\\OneDrive\\dev\\Django_Projects\\RankedJobs\\main\\src\\frontend\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@12.11.1 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "D:\Users\mrbub\.windows-build-tools\python27\python.exe" in the PATH
gyp verb `which` failed Error: not found: D:\Users\mrbub\.windows-build-tools\python27\python.exe
gyp verb `which` failed     at getNotFoundError (D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:169:21)
gyp verb `which` failed  D:\Users\mrbub\.windows-build-tools\python27\python.exe Error: not found: D:\Users\mrbub\.windows-build-tools\python27\python.exe
gyp verb `which` failed     at getNotFoundError (D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:169:21) {
gyp verb `which` failed   stack: 'Error: not found: D:\\Users\\mrbub\\.windows-build-tools\\python27\\python.exe\n' +
gyp verb `which` failed     '    at getNotFoundError (D:\\Users\\mrbub\\OneDrive\\dev\\Django_Projects\\RankedJobs\\main\\src\\frontend\\node_modules\\which\\which.js:13:12)\n' +
gyp verb `which` failed     '    at F (D:\\Users\\mrbub\\OneDrive\\dev\\Django_Projects\\RankedJobs\\main\\src\\frontend\\node_modules\\which\\which.js:68:19)\n' +
gyp verb `which` failed     '    at E (D:\\Users\\mrbub\\OneDrive\\dev\\Django_Projects\\RankedJobs\\main\\src\\frontend\\node_modules\\which\\which.js:80:29)\n' +
gyp verb `which` failed     '    at D:\\Users\\mrbub\\OneDrive\\dev\\Django_Projects\\RankedJobs\\main\\src\\frontend\\node_modules\\which\\which.js:89:16\n' +
gyp verb `which` failed     '    at D:\\Users\\mrbub\\OneDrive\\dev\\Django_Projects\\RankedJobs\\main\\src\\frontend\\node_modules\\isexe\\index.js:42:5\n' +
gyp verb `which` failed     '    at D:\\Users\\mrbub\\OneDrive\\dev\\Django_Projects\\RankedJobs\\main\\src\\frontend\\node_modules\\isexe\\windows.js:36:5\n' +
gyp verb `which` failed     '    at FSReqCallback.oncomplete (fs.js:169:21)',
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb could not find "D:\Users\mrbub\.windows-build-tools\python27\python.exe". checking python launcher
gyp verb could not find "D:\Users\mrbub\.windows-build-tools\python27\python.exe". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "D:\Users\mrbub\.windows-build-tools\python27\python.exe", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at callback (D:\Users\mrbub\OneDrive\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\graceful-fs\polyfills.js:295:20)
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:169:21)
gyp ERR! System Windows_NT 10.0.19037
gyp ERR! command "C:\\Languages\\NodeJs\\node.exe" "D:\\Users\\mrbub\\OneDrive\\dev\\Django_Projects\\RankedJobs\\main\\src\\frontend\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\gulp-sass\node_modules\node-sass
gyp ERR! node -v v12.11.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN rollback Rolling back node-pre-gyp@0.12.0 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\dev\Django_Projects\RankedJobs\main\src\frontend\node_modules\fsevents'
npm WARN notsup Unsupported engine for got@5.7.1: wanted: {"node":">=0.10.0 <7"} (current: {"node":"12.11.1","npm":"6.12.0"})
npm WARN notsup Not compatible with your version of node/npm: got@5.7.1
npm WARN svelte-app@1.0.0 No description
npm WARN svelte-app@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.13.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Users\mrbub\AppData\Roaming\npm-cache\_logs\2019-12-13T18_34_28_692Z-debug.log
fsecada01 commented 4 years ago

As I'm digging through this more, it seems like there are three issues:

1) the subprocess run command needs the shell=True argument to run the list of line command components.

2) The NPM modules are out of date/non-existent

3) Foundation Email requires Node v10; newer versions (like 12) are not compatible with the CLI.

Is it possible to build nvm or anything into this module?

fsecada01 commented 4 years ago

The workaround I have right now is to install and work with Foundation Email via the Sass and node.js method directly. I had to utilize npx to run Node as v10. These were the commands that ultimately worked for me.

npm install -g foundation-cli
npx -p node@10 foundation new --framework emails
ren at the prompt, write in the name of the project. For this demo, I chose Emails
cd Emails
npx -p node@10 foundation watch

Trying to install foundation emails directly w/o Node v.10 causes issues with certain previously-native packages like primordial. This seems like the best workaround.