2

I cannot install an application using Vuetify on Azure Web App with a dependency on fibers package.

This package fails all the time, even when trying to install it alone (npm install fibers).

I run a simple Windows machine with a Node LTS stack. Although I tried with other stacks and even Linux with similar result.

The output message gives an alternative to build the package yourself but those guides require administrative privileges which is not possible to have on Azure Web App (to the best of my knowledge at least).

The package is quite popular which should be a wide problem on Azure developers, right?

Here the full output message from CMD (via Kudu):

D:\home\site\wwwroot>npm install fibers
gyp ERR! build error 
gyp ERR! stack Error: `D:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\Program Files (x86)\npm\6.12.0\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "D:\\Program Files (x86)\\nodejs\\12.13.0\\node.exe" "D:\\Program Files (x86)\\npm\\6.12.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd D:\home\site\wwwroot\node_modules\fibers
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'` 
Alpine users please run: `sudo apk add python make g++`
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
npm WARN enoent ENOENT: no such file or directory, open 'D:\home\site\wwwroot\package.json'
npm WARN wwwroot No description
npm WARN wwwroot No repository field.
npm WARN wwwroot No README data
npm WARN wwwroot No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fibers@5.0.0 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the fibers@5.0.0 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!     D:\local\AppData\npm-cache\_logs\2020-07-22T15_13_22_997Z-debug.log
Julen
  • 1,574
  • 3
  • 22
  • 38

1 Answers1

0

In Azure webapp, the operating environment of node is more complicated. Azure generally only supports basic npm,npx and other global installation packages. I haven't encountered the rest for the time being. Because the environment is more complicated, I recommend using Linux runtime environment when creating webapp.

Steps to troubleshoot:

  1. Ensure that the local project is running normally and upload the code to github. If there is confidential information, remember to select the private mode when creating the project. For more detail, you can refer to my answer in this post which can tell you how to trouble shooting.

  2. Then use git continuous deployment to deploy the application to Azure.

Generally speaking, most of the deployment problems can be solved after this step. If not, you can view the specific error message in the Action.

Of course, if you are unwilling to use git deployment, you can use FTP to publish the local running code after building it, provided that git can be deployed and run successfully.

Jason Pan
  • 15,263
  • 1
  • 14
  • 29
  • @Julen Are your local projects running normally? – Jason Pan Jul 27 '20 at 07:33
  • @Julen Can you provide sample code? If there is no confidential information in the code, it can be better tested. – Jason Pan Jul 27 '20 at 07:35
  • Locally runs fine. I tried in Heroku and install fibers ok. And my test above does not include any project. ´npm install fibers´ is just failing on Azure. – Julen Jul 28 '20 at 11:45
  • @Julen Can you upload your code to github and use git to deploy it for testing purposes only. Test whether Azure supports `fibers`. – Jason Pan Jul 28 '20 at 13:40
  • Sorry Jason, I cannot. :( – Julen Jul 29 '20 at 07:03
  • You also can transfer your whole project to webapp by FTP which works fine in local to test. You don't need to npm install anything. – Jason Pan Jul 29 '20 at 07:10
  • Yes, that is one workaorund. But is preventing us to have longer deployments and we like to npm install in the target machine. – Julen Jul 30 '20 at 08:11
  • @Julen If you are not too troublesome, you can also try to build a local git environment, and then use local git to publish. – Jason Pan Jul 30 '20 at 08:16
  • @Julen Before that, it is recommended to create a new demo containing `fibers` package, and then use git to deploy. If successful, then there should be no problem with local git publishing your project. – Jason Pan Jul 30 '20 at 08:17
  • Thanks Jason, but right now I can't do that. Anyway I think the issue is not related neither with the deployment nor the project. Somehow there is something missing in our Web App configuration (or App Service containing it) that prevents ´npm install fibers´ to run correctly. – Julen Jul 31 '20 at 07:07
  • @Julen You are welcome. Maybe you can raise a support ticket to confirm that. – Jason Pan Jul 31 '20 at 07:15