Skip to content

Trying to configure node-gyp with WSL #1346

Closed
@spences10

Description

@spences10
  • Node Version: v8.9.1
  • Platform: Linux DESKTOP-KCGTGRV 4.4.0-43-Microsoft Make 0.6.x work #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux
  • Compiler: Reading specs from /home/linuxbrew/.linuxbrew/Cellar/gcc/5.4.0/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/specs
    COLLECT_GCC=cc
    COLLECT_LTO_WRAPPER=/home/linuxbrew/.linuxbrew/Cellar/gcc/5.4.0/libexec/gcc/x86_64-unknown-linux-gnu/5.4.0/lto-wrapp
    er
    Target: x86_64-unknown-linux-gnu
    Configured with: ../configure --prefix=/home/linuxbrew/.linuxbrew/Cellar/gcc/5.4.0 --enable-languages=c,c++,objc,ob
    j-c++,fortran --program-suffix=-5 --with-gmp=/home/linuxbrew/.linuxbrew/opt/gmp --with-mpfr=/home/linuxbrew/.linuxbr
    ew/opt/mpfr --with-mpc=/home/linuxbrew/.linuxbrew/opt/libmpc --with-isl=/home/linuxbrew/.linuxbrew/opt/isl --enable
    -stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-
    pkgversion='Homebrew gcc 5.4.0' --with-bugurl=https://github.com/Homebrew/homebrew/issues --with-boot-ldflags='-stat
    ic-libstdc++ -static-libgcc ' --disable-nls --disable-multilib
    Thread model: posix
    gcc version 5.4.0 (Homebrew gcc 5.4.0)
  • Module: Tried to install npm install -g semantic-release-cli
Verbose output (from npm or node-gyp):
⟩ npm install -g semantic-release-cli
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
/home/linuxbrew/.linuxbrew/bin/semantic-release-cli -> /home/linuxbrew/.linuxbrew/lib/node_modules/semantic-release-
cli/bin/semantic-release.js

> keytar@4.0.5 install /home/linuxbrew/.linuxbrew/lib/node_modules/semantic-release-cli/node_modules/keytar
> node-gyp rebuild

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "/usr/lib/python2.7", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/node-g
yp/lib/configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/node-gy
p/lib/configure.js:397:16)
gyp ERR! stack     at F (/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js
:42:5
gyp ERR! stack     at /home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:
8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:153:5)
gyp ERR! System Linux 4.4.0-43-Microsoft
gyp ERR! command "/home/linuxbrew/.linuxbrew/Cellar/node/8.9.1/bin/node" "/home/linuxbrew/.linuxbrew/lib/node_module
s/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/linuxbrew/.linuxbrew/lib/node_modules/semantic-release-cli/node_modules/keytar
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: keytar@4.0.5 (node_modules/semantic-release-cli/node_modules/keytar)
:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: keytar@4.0.5 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ semantic-release-cli@3.2.6
added 2 packages and updated 1 package in 65.389s

When I try set the python env variable with either:

node-gyp --python /home/linuxbrew/.linuxbrew/bin/python2.7

or

node-gyp --python /usr/lib/python2.7

I get the help text pop up, like it's an invalid command:

  Usage: node-gyp <command> [options]

  where <command> is one of:
    - build - Invokes `make` and builds the module
    - clean - Removes any generated build files and the "out" dir
    - configure - Generates a Makefile for the current module
    - rebuild - Runs "clean", "configure" and "build" all at once
    - install - Install node development files for the specified node version.
    - list - Prints a listing of the currently installed node development files
    - remove - Removes the node development files for the specified version

node-gyp@3.6.2  /home/linuxbrew/.linuxbrew/lib/node_modules/node-gyp
node@8.9.1

I have tried to keep everything on WSL for developement but always seem to run into issues with node-gyp

Any advice greatly appreciated

Here is my whereis details:

⟩ whereis python
python: /usr/bin/python3.5 /usr/bin/python3.5m /usr/lib/python2.7 /usr/lib/python3.5 /etc/python3.5 /usr/local/lib/p
ython3.5 /usr/share/python /home/linuxbrew/.linuxbrew/bin/python2.7 /home/linuxbrew/.linuxbrew/bin/python2.7-config
⟩ whereis node
node: /home/linuxbrew/.linuxbrew/bin/node
⟩ whereis npm
npm: /home/linuxbrew/.linuxbrew/bin/npm
⟩ whereis .node-gyp
: /usr/bin/. /usr/sbin/. /usr/lib/. /bin/. /sbin/. /etc/. /lib/. /lib64/. /usr/games/. /usr/local/bin/. /usr/local/s
bin/. /usr/local/etc/. /usr/local/lib/. /usr/local/games/. /usr/include/. /usr/local/. /usr/share/. /home/linuxbrew/
.linuxbrew/bin/. /mnt/c/Program Files (x86)/Intel/iCLS Client/. /mnt/c/Program Files/Intel/iCLS Client/. /mnt/c/Wind
ows/System32/. /mnt/c/Windows/. /mnt/c/Windows/System32/wbem/. /mnt/c/Windows/System32/WindowsPowerShell/v1.0/. /mnt
/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL/. /mnt/c/Program Files/Intel/Intel(R) Managem
ent Engine Components/DAL/. /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT/. /mnt/c/Prog
ram Files/Intel/Intel(R) Management Engine Components/IPT/. /mnt/c/Program Files/Intel/WiFi/bin/. /mnt/c/Program Fil
es/Common Files/Intel/WirelessCommon/. /mnt/c/ProgramData/chocolatey/bin/. /mnt/c/Program Files/Git/cmd/. /mnt/c/Use
rs/spenc/AppData/Local/Microsoft/WindowsApps/. /mnt/c/Program Files/Microsoft VS Code/bin/. /usr/share/man/cs/. /usr
/share/man/da/. /usr/share/man/de/. /usr/share/man/es/. /usr/share/man/fi/. /usr/share/man/fr/. /usr/share/man/hu/.
/usr/share/man/id/. /usr/share/man/it/. /usr/share/man/ja/. /usr/share/man/ko/. /usr/share/man/man1/. /usr/share/man
/man2/. /usr/share/man/man3/. /usr/share/man/man4/. /usr/share/man/man5/. /usr/share/man/man6/. /usr/share/man/man7/
. /usr/share/man/man8/. /usr/share/man/man9/. /usr/share/man/nl/. /usr/share/man/pl/. /usr/share/man/pt/. /usr/share
/man/pt_BR/. /usr/share/man/ru/. /usr/share/man/sl/. /usr/share/man/sv/. /usr/share/man/tr/. /usr/share/man/zh_CN/.
/usr/share/man/zh_TW/. /usr/share/info/. /home/linuxbrew/.linuxbrew/share/man/. /mnt/c/Users/spenc/gitrepos/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions