Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: ~/workspace/testest/node_modules/node-sass
Output:
Building: ~/.nvm/versions/node/v15.4.0/bin/node ~/workspace/testest/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 `which` failed code: 'ENOENT'
gyp verb `which` failed }
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (~workspace/testest/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (~workspace/testest/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! command "~.nvm/versions/node/v15.4.0/bin/node" "~workspace/testest/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd ~workspace/testest/node_modules/node-sass
gyp ERR! node -v v15.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
Really have no idea what actually happens. I don't know when this happened (I built a lot of rails apps for my study but had no problem before) but just recently noticed.
Make sure you have python installed on your machine.
On your terminal RUN which python
It should return your python location path that looks something like
/usr/local/bin/python
Then run
npm config set python </usr/local/bin/python>
OR
just RUN export PYTHON="$(which python3)"
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments