简体   繁体   中英

Java Gradle Project Build Error

Seeking help with following Git Bash error output (build failed). Note: Another co-worker thought issue wasn't with Node/ NPM but suggested installing Python to fix, which I did (Python 2.7.10), set Python environment variable in IntelliJ to "PYTHONPATH = C:\\Python27" (where .exe resides), and still getting build failed error. All suggestions appreciated.

$ ./run.sh
:nodeSetup SKIPPED
:npmSetup SKIPPED
:npmInstall

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

connect EACCES 192.30.253.112:443

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@3.13.1 postinstall C:\Users\xyz\git\PasswordReset\node_modules\node-sass
node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\Users\xyz\git\Project1\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 [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\xyz\\git\\Project1\\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 info using node-gyp@3.6.2
gyp info using node@8.9.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 "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\xyz\git\Project1\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\xyz\git\Project1\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\xyz\git\Project1\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\xyz\git\Project1\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\xyz\git\Project1\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\xyz\git\Project1\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\Users\xyz\git\Project1\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\xyz\git\Project1\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\xyz\git\Project1\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\Users\xyz\git\Project1\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\xyz\git\Project1\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\xyz\git\Project1\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\xyz\git\Project1\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp verb check python version `C:\Python27\python.exe -c "import platform; print(platform.python_version());"` returned: "2.7.14\r\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.9.1
gyp verb command install [ '8.9.1' ]
gyp verb install input version string "8.9.1"
gyp verb install installing version: 8.9.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 8.9.1
gyp verb ensuring nodedir is created C:\Users\xyz\.node-gyp\8.9.1
gyp verb created nodedir C:\Users\xyz\.node-gyp
gyp http GET https://nodejs.org/download/release/v8.9.1/node-v8.9.1-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp verb command remove [ '8.9.1' ]
gyp verb remove using node-gyp dir: C:\Users\xyz\.node-gyp
gyp verb remove removing target version: 8.9.1
gyp verb remove removing development files for version: 8.9.1
gyp ERR! configure error
gyp ERR! stack Error: connect EACCES 104.20.23.46:443
gyp ERR! stack     at Object._errnoException (util.js:1024:11)
gyp ERR! stack     at _exceptionWithHostPort (util.js:1046:20)
gyp ERR! stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xyz\\git\\Project1\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\xyz\git\Project1\node_modules\node-sass
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN Project1 No repository field.
npm WARN Project1 No license field.
npm WARN The package gulp-bower is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: 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!     C:\Users\xyz\AppData\Roaming\npm-cache\_logs\2018-04-13T20_29_18_629Z-debug.log
:npmInstall FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':npmInstall'.
Process 'command 'npm.cmd'' finished with non-zero exit value 1

If you look at:

gyp verb check python version `C:\Python27\python.exe -c "import platform; print(platform.python_version());"` returned: "2.7.14\r\n"

it actually finds python and checks its version

The main issue you are having is that it cannot download a file from github because the link is dead. If you look at https://github.com/sass/node-sass/releases/tag/v3.13.1 there is no win32-x64-57_binding.node file available for download.

You could try replacing the link in your script with this: https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-51_binding.node

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM