Share via

Angular Web App will not publish (python2 error)

Eric Bowman 6 Reputation points
Mar 29, 2021, 7:07 PM

I have an angular web app I've developed in visual studio. It compiles and debugs fine on my computer, but when I go to publish it to a newly created linux web app instance I get the following errors:

1>------ Publish started: Project: ColoradoRapids, Configuration: Release Any CPU ------

ColoradoRapids -> C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\bin\Release\netcoreapp3.1\ColoradoRapids.dll
ColoradoRapids -> C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\bin\Release\netcoreapp3.1\ColoradoRapids.Views.dll
npm install

node-sass@4.13.1 install C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\node-sass
node scripts/install.js

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

HTTP error 404 Not Found

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@4.13.1 postinstall C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\node-sass
node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\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 [
gyp verb cli 'C:\Program Files\nodejs\node.exe',
gyp verb cli 'C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\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 verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@14.16.0 | 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
EXEC(0,0): Error : not found: python2
gyp verb which failed at getNotFoundError (C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\which\which.js:89:16
gyp verb which failed at C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\isexe\index.js:42:5
gyp verb which failed at C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\isexe\windows.js:36:5
gyp verb which failed at FSReqCallback.oncomplete (fs.js:183:21)
EXEC(0,0): Error : not found: python2
gyp verb which failed at getNotFoundError (C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\which\which.js:89:16
gyp verb which failed at C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\isexe\index.js:42:5
gyp verb which failed at C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\isexe\windows.js:36:5
gyp verb which failed at FSReqCallback.oncomplete (fs.js:183:21) {
gyp verb which failed code: 'ENOENT'
gyp verb which failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb which succeeded python C:\Python39\python.EXE
gyp ERR! configure error
EXEC(0,0): Error : Command failed: C:\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:308:12)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ClientApp\node_modules\node-sass
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
EXEC(0,0): Error code: 1
npm WARN @angular/compiler-cli@8.2.14 requires a peer of @angular/compiler@8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\@angular\compiler-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.13.1 (node_modules\node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.13.1 postinstall: node scripts/build.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

audited 1547 packages in 10.847s

36 packages are looking for funding
run npm fund for details

found 302 vulnerabilities (276 low, 4 moderate, 22 high)
run npm audit fix to fix them, or npm audit for details
C:\Users\Eric\source\repos\ColoradoRapids\ColoradoRapids\ColoradoRapids.csproj(38,5): Error MSB3073: The command "npm install" exited with code -1.
1>Build failed. Check the Output window for more details.
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,110 questions
{count} vote

2 answers

Sort by: Oldest
  1. Nagendra 1 Reputation point
    Mar 31, 2021, 2:39 PM

    Same here.. waiting for a response

    0 comments No comments

  2. Nagendra 1 Reputation point
    Mar 31, 2021, 3:00 PM

    fixed it using git bash (installed seperately)
    by running below command
    npm install --unsafe-perm -g node-sass

    But still need to understand why this error


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.