Ask questionsBuilds Fail on WSL

I am having issues building anything with node-gyp in Ubuntu 16.04 under Windows Subsystem for Linux. Is it my error or is node-gyp known to not work under WSL?

I have the following installed: node-gyp 3.6.1 make (4.1-6) gcc 4:5.3.1-1ubuntu1 npm 3.10.10 nodejs v6.10.3 python 2.7

I have set the python path using npm config set python /usr/lib/python2.7

I have verified that Python is installed in that location.

I attempted to install sharp using the command line sudo npm install sharp --save

I have attached the debug log.

I also saw failures when trying to install bcrypt with npm install --build-from-source bcrypt

Any advice would be appreciated. Thanks.


Answer questions ahmadalibaloch

on WSL2, latest updates, still getting the problem, tried all fixes: recipe for target 'Release/' failed make: *** [Release/] Error 1 make: Leaving directory '/home/ahmad/.nvm/versions/node/v13.12.0/lib/node_modules/jscast/node_modules/lame/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/ahmad/.nvm/versions/node/v13.12.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Linux 4.19.104-microsoft-standard gyp ERR! command "/home/ahmad/.nvm/versions/node/v13.12.0/bin/node" "/home/ahmad/.nvm/versions/node/v13.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/ahmad/.nvm/versions/node/v13.12.0/lib/node_modules/jscast/node_modules/lame gyp ERR! node -v v13.12.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! lame@1.2.4 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the lame@1.2.4 install 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! /home/ahmad/.npm/_logs/2020-04-19T05_44_38_617Z-debug.log

Ahmad Ali ahmadalibaloch @xoredge and Intech Process Automation Islamabad, Pakistan Full stack developer; react, angular, python, .net, data visualization, machine learning (TS-JS). Cloud, dockers, cloud functions, firebase, android kotlin dev.
Github User Rank List