Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue running $ npm install as recommended in README.md #82

Open
joshimmel opened this issue Oct 26, 2022 · 1 comment
Open

Issue running $ npm install as recommended in README.md #82

joshimmel opened this issue Oct 26, 2022 · 1 comment

Comments

@joshimmel
Copy link

Tried changing the npm versions with no luck.

Currently producing this error below with:
node v18.12.0
npm v8.19.2
npx v8.19.2

- joshu@LAPTOP MINGW64 ~/OneDrive/Pictures/photography_website/photography (master)
- $ npm install
- npm WARN old lockfile
- npm WARN old lockfile The package-lock.json file was created with an old version of npm,
- npm WARN old lockfile so supplemental metadata must be fetched from the registry.
- npm WARN old lockfile
- npm WARN old lockfile This is a one-time fix-up, please be patient...
- npm WARN old lockfile
- npm WARN deprecated set-value@2.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
- npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
- npm WARN deprecated mixin-deep@1.3.1: Critical bug fixed in v2.0.1, please upgrade to the latest version.
- npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
- npm WARN deprecated set-value@0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
- npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
- npm WARN deprecated har-validator@5.1.3: this library is no longer supported
- npm WARN deprecated har-validator@5.1.3: this library is no longer supported
- npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
- npm WARN deprecated clone@1.0.2: XSS vulnerability fixed in v1.0.3
- npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
- npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
- npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
- 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 resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
- npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
- npm WARN deprecated source-map-resolve@0.5.2: See https://github.com/lydell/source-map-resolve#deprecated
- npm WARN deprecated debug@3.2.6: 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 mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
- npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
- npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
- npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
- npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
- npm WARN deprecated tar@2.2.1: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
- npm ERR! code 1
- npm ERR! path C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\node-sass
- npm ERR! command failed
- npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
- npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\joshu\OneDrive\Pictures\photography_website\photography\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   'C:\\Program Files\\nodejs\\node.exe',
- npm ERR! gyp verb cli   'C:\\Users\\joshu\\OneDrive\\Pictures\\photography_website\\photography\\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@18.12.0 | win32 | 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` failed Error: not found: python2
- npm ERR! gyp verb `which` failed     at getNotFoundError (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:13:12)
- npm ERR! gyp verb `which` failed     at F (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:68:19)
- npm ERR! gyp verb `which` failed     at E (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:80:29)
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:89:16
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\isexe\index.js:44:5
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\isexe\windows.js:29:5
- npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:207:21)
- npm ERR! gyp verb `which` failed  python2 Error: not found: python2
- npm ERR! gyp verb `which` failed     at getNotFoundError (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:13:12)
- npm ERR! gyp verb `which` failed     at F (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:68:19)
- npm ERR! gyp verb `which` failed     at E (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:80:29)
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:89:16
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\isexe\index.js:44:5
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\isexe\windows.js:29:5
- npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:207:21) {
- npm ERR! gyp verb `which` failed   code: 'ENOENT'
- npm ERR! gyp verb `which` failed }
- npm ERR! gyp verb check python checking for Python executable "python" in the PATH
- npm ERR! gyp verb `which` failed Error: not found: python
- npm ERR! gyp verb `which` failed     at getNotFoundError (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:13:12)
- npm ERR! gyp verb `which` failed     at F (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:68:19)
- npm ERR! gyp verb `which` failed     at E (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:80:29)
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:89:16
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\isexe\index.js:44:5
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\isexe\windows.js:29:5
- npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:207:21)
- npm ERR! gyp verb `which` failed  python Error: not found: python
- npm ERR! gyp verb `which` failed     at getNotFoundError (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:13:12)
- npm ERR! gyp verb `which` failed     at F (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:68:19)
- npm ERR! gyp verb `which` failed     at E (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:80:29)
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\which\which.js:89:16
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\isexe\index.js:44:5
- npm ERR! gyp verb `which` failed     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\isexe\windows.js:29:5
- npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:207:21) {
- npm ERR! gyp verb `which` failed   code: 'ENOENT'
- npm ERR! gyp verb `which` failed }
- npm ERR! gyp verb could not find "python". checking python launcher
- npm ERR! gyp verb could not find "python". guessing location
- npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
- npm ERR! gyp ERR! configure error
- npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
- npm ERR! gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\node-gyp\lib\configure.js:484:19)
- npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\node-gyp\lib\configure.js:509:16)
- npm ERR! gyp ERR! stack     at C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\node-gyp\node_modules\graceful-fs\polyfills.js:282:31
- npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:207:21)
- npm ERR! gyp ERR! System Windows_NT 10.0.19044
- npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\joshu\\OneDrive\\Pictures\\photography_website\\photography\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
- npm ERR! gyp ERR! cwd C:\Users\joshu\OneDrive\Pictures\photography_website\photography\node_modules\node-sass
- npm ERR! gyp ERR! node -v v18.12.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!     C:\Users\joshu\AppData\Local\npm-cache\_logs\2022-10-26T00_56_47_618Z-debug-0.log
- 
@frapgadz
Copy link

frapgadz commented Apr 21, 2023

/I had the same problem and after a bit of looking I found a workaround. Here's how I fixed it:

I uninstalled Node.js and used NVM for Windows to install Node 14.x.x (I used 14.15.1) (I used NVM for Windows so I could quickly swap Node versions if needed)

I then had an issue with node-sass, so I had to run $ npm install node-sass from the photography directory, I then ran $ npm ci.

This got me almost the whole way, however when I ran $ gulp I got the following error ReferenceError: primordials is not defined. After Googling the error I found this useful thread on Stack Overflow.

I followed the instructions in this answer from @Valentin, basically you need to add the following to package.json

{
  "scripts": { 
    "preinstall": "npx npm-force-resolutions" 
  }, 
  "resolutions": { 
    "graceful-fs": "^4.2.10"
  }
} 

I ran $ npm install again and then $ gulp works as expected!

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants