Azure Web Service Deployment fails for Node.js project

Viewed 314

I have a weird problem while deploying our Vue.js project to an Azure Web Service. First things first: the setup worked out perfectly and I can access the Web Service, the only problem I face is, that the deployment fails. When I locally start the application with npm run serve everything works fine, BUT I get tons of errors like 82:18 Property 'load' does not exist on type 'Vue'..

We ignored those errors for now, since load exists and we can use it normally and did not find a solution to resolve those errors. Therefore, the question is: might those errors (even though the displayed errors are flagging something we use and which works) fail the deployment?

The last line of the deployment is as follows:

2021-06-23T15:09:46.095Z - npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules/webpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fork-ts-checker-webpack-plugin/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

-  Building for production...
 ERROR  Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the project@0.1.0 build 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/.npm/_logs/2021-06-23T15_09_29_048Z-debug.log
/opt/Kudu/Scripts/starter.sh oryx build /home/site/repository -o /home/site/wwwroot --platform nodejs --platform-version 14 -i /tmp/8d93658061b46ee -p compress_node_modules=tar-gz --log-file /tmp/build-debug.log 

I honestly do not know what to do with this huge error. I searched around a bit, but did not find a fitting solution.


I tried to run npm run build locally (thank you @polmonite) and my error log in the npm cache looks like this now:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build' ]
2 info using npm@6.4.1
3 info using node@v8.12.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle myProject@0.1.0~prebuild: myProject@0.1.0
6 info lifecycle myProject@0.1.0~build: myProject@0.1.0
7 verbose lifecycle myProject@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle myProject@0.1.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\***\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\CMake\bin;C:\Users\***\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\***\AppData\Local\Programs\Python\Python39\;C:\Users\***\AppData\Local\Microsoft\WindowsApps;C:\Users\***\AppData\Roaming\npm;C:\Users\***\.dotnet\tools;C:\Users\***\AppData\Local\Microsoft\WindowsApps;C:\Users\***\.dotnet\tools;C:\Users\***\AppData\Local\Programs\Microsoft VS Code\bin;
9 verbose lifecycle myProject@0.1.0~build: CWD: C:\Users\***\myProject
10 silly lifecycle myProject@0.1.0~build: Args: [ '/d /s /c', 'vue-cli-service build' ]
11 silly lifecycle myProject@0.1.0~build: Returned: code: 1  signal: null
12 info lifecycle myProject@0.1.0~build: Failed to exec build script
13 verbose stack Error: myProject@0.1.0 build: `vue-cli-service build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:915:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid myProject@0.1.0
15 verbose cwd C:\Users\***\Git\myProject
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v8.12.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error myProject@0.1.0 build: `vue-cli-service build`
22 error Exit status 1
23 error Failed at the myProject@0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
1 Answers

I've had similar problems , This may not help you but have you checked the capacity of your app service plan ? if you are using the free tier (1GB of free memory) then the size of your project (including node_modules of course) should not exceed the 1GB limit .

Related