Azure DevOps npm install fails with post install script errors for node-sass 4.9.0 - azure-devops

I'm trying to run a build. I've made very minor changes since the last build ran (about 5 months ago) but now I can't get past npm install.
Here's some excerpts of the log - I'd post more but SO won't let me as its so big...
2020-01-29T13:32:00.3347468Z ##[section]Starting: npm install
2020-01-29T13:32:00.3445773Z ==============================================================================
2020-01-29T13:32:00.3445826Z Task : npm
2020-01-29T13:32:00.3445864Z Description : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Azure Artifacts.
2020-01-29T13:32:00.3445892Z Version : 1.161.0
2020-01-29T13:32:00.3445917Z Author : Microsoft Corporation
2020-01-29T13:32:00.3445967Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/package/npm
2020-01-29T13:32:00.3445994Z ==============================================================================
2020-01-29T13:32:00.7920586Z SYSTEMVSSCONNECTION exists true
2020-01-29T13:32:00.9489042Z SYSTEMVSSCONNECTION exists true
2020-01-29T13:32:01.3438318Z [command]C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" --version"
2020-01-29T13:32:11.3468119Z 6.13.4
2020-01-29T13:32:13.4260298Z [command]C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" config list"
2020-01-29T13:32:13.9747579Z ; cli configs
2020-01-29T13:32:13.9748043Z metrics-registry = "https://registry.npmjs.org/"
2020-01-29T13:32:13.9748226Z scope = ""
2020-01-29T13:32:13.9748386Z user-agent = "npm/6.13.4 node/v12.14.1 win32 x64"
2020-01-29T13:32:13.9748504Z
2020-01-29T13:32:13.9748640Z ; environment configs
2020-01-29T13:32:13.9748792Z cache = "C:\\npm\\cache"
2020-01-29T13:32:13.9748951Z prefix = "C:\\npm\\prefix"
2020-01-29T13:32:13.9749077Z userconfig = "D:\\a\\1\\npm\\124.npmrc"
2020-01-29T13:32:13.9749211Z
2020-01-29T13:32:13.9749338Z ; builtin config undefined
2020-01-29T13:32:13.9749449Z
2020-01-29T13:32:13.9749576Z ; node bin location = C:\Program Files\nodejs\node.exe
2020-01-29T13:32:13.9749724Z ; cwd = D:\a\1\s\src\Ministryweb
2020-01-29T13:32:13.9749849Z ; HOME = C:\Users\VssAdministrator
2020-01-29T13:32:13.9750000Z ; "npm config ls -l" to show all defaults.
2020-01-29T13:32:13.9750146Z
2020-01-29T13:32:13.9803873Z [command]C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" install"
2020-01-29T13:34:15.6513894Z
2020-01-29T13:34:15.6514788Z > node-sass#4.9.0 install D:\a\1\s\src\Ministryweb\node_modules\node-sass
2020-01-29T13:34:15.6514976Z > node scripts/install.js
2020-01-29T13:34:15.6515158Z
2020-01-29T13:34:15.6515339Z Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/win32-x64-72_binding.node
2020-01-29T13:34:15.6515564Z
2020-01-29T13:34:15.6515739Z > node-sass#4.9.0 postinstall D:\a\1\s\src\Ministryweb\node_modules\node-sass
2020-01-29T13:34:15.6515874Z > node scripts/build.js
2020-01-29T13:34:15.6515991Z
2020-01-29T13:34:15.6516160Z Building: C:\Program Files\nodejs\node.exe D:\a\1\s\src\Ministryweb\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
2020-01-29T13:34:15.6516306Z Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
2020-01-29T13:34:15.6516469Z Build started 1/29/2020 1:32:48 PM.
2020-01-29T13:34:15.6516640Z Project "D:\a\1\s\src\Ministryweb\node_modules\node-sass\build\binding.sln" on node 1 (default targets).
2020-01-29T13:34:15.6516772Z ValidateSolutionConfiguration:
2020-01-29T13:34:15.6516907Z Building solution configuration "Release|x64".
2020-01-29T13:34:15.6517083Z Project "D:\a\1\s\src\Ministryweb\node_modules\node-sass\build\binding.sln" (1) is building "D:\a\1\s\src\Ministryweb\node_modules\node-sass\build\binding.vcxproj.metaproj" (2) on node 1 (default targets).
2020-01-29T13:34:15.6517456Z Project "D:\a\1\s\src\Ministryweb\node_modules\node-sass\build\binding.vcxproj.metaproj" (2) is building "D:\a\1\s\src\Ministryweb\node_modules\node-sass\build\src\libsass.vcxproj" (3) on node 1 (default targets).
2020-01-29T13:34:15.6517700Z PrepareForBuild:
2020-01-29T13:34:15.6517847Z Creating directory "Release\obj\libsass\".
2020-01-29T13:34:15.6519124Z Creating directory "D:\a\1\s\src\Ministryweb\node_modules\node-sass\build\Release\".
2020-01-29T13:34:15.6519299Z Creating directory "Release\obj\libsass\libsass.tlog\".
2020-01-29T13:34:15.6519429Z InitializeBuildStatus:
2020-01-29T13:34:15.6519566Z Creating "Release\obj\libsass\libsass.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
2020-01-29T13:34:15.6519727Z ClCompile:
2020-01-29T13:34:15.6520514Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe /c /I"C:\Users\VssAdministrator\.node-gyp\12.14.1\include\node" /I"C:\Users\VssAdministrator\.node-gyp\12.14.1\src" /I"C:\Users\VssAdministrator\.node-gyp\12.14.1\deps\uv\include" /I"C:\Users\VssAdministrator\.node-gyp\12.14.1\deps\v8\include" /I..\..\src\libsass\include /Z7 /nologo /W3 /WX- /diagnostics:classic /MP /Ox /Ob2 /Oi /Ot /Oy /D NODE_GYP_MODULE_NAME=libsass /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D V8_DEPRECATION_WARNINGS /D V8_IMMINENT_DEPRECATION_WARNINGS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D "LIBSASS_VERSION=\"3.5.4\"" /GF /Gm- /MT /GS /Gy /fp:precise /Qspectre /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\libsass\\" /Fd"Release\obj\libsass\libsass.pdb" /Gd /TP /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /GR /EHsc ..\..\src\libsass\src\ast.cpp ..\..\src\libsass\src\ast_fwd_decl.cpp ..\..\src\libsass\src\backtrace.cpp ..\..\src\libsass\src\base64vlq.cpp ..\..\src\libsass\src\bind.cpp ..\..\src\libsass\src\check_nesting.cpp ..\..\src\libsass\src\color_maps.cpp ..\..\src\libsass\src\constants.cpp ..\..\src\libsass\src\context.cpp ..\..\src\libsass\src\cssize.cpp ..\..\src\libsass\src\emitter.cpp ..\..\src\libsass\src\environment.cpp ..\..\src\libsass\src\error_handling.cpp ..\..\src\libsass\src\eval.cpp ..\..\src\libsass\src\expand.cpp ..\..\src\libsass\src\extend.cpp ..\..\src\libsass\src\file.cpp ..\..\src\libsass\src\functions.cpp ..\..\src\libsass\src\inspect.cpp ..\..\src\libsass\src\json.cpp ..\..\src\libsass\src\lexer.cpp ..\..\src\libsass\src\listize.cpp ..\..\src\libsass\src\memory\SharedPtr.cpp ..\..\src\libsass\src\node.cpp ..\..\src\libsass\src\operators.cpp ..\..\src\libsass\src\output.cpp ..\..\src\libsass\src\parser.cpp ..\..\src\libsass\src\plugins.cpp ..\..\src\libsass\src\position.cpp ..\..\src\libsass\src\prelexer.cpp ..\..\src\libsass\src\remove_placeholders.cpp ..\..\src\libsass\src\sass.cpp ..\..\src\libsass\src\sass2scss.cpp ..\..\src\libsass\src\sass_context.cpp ..\..\src\libsass\src\sass_functions.cpp ..\..\src\libsass\src\sass_util.cpp ..\..\src\libsass\src\sass_values.cpp ..\..\src\libsass\src\source_map.cpp ..\..\src\libsass\src\subset_map.cpp ..\..\src\libsass\src\to_c.cpp ..\..\src\libsass\src\to_value.cpp ..\..\src\libsass\src\units.cpp ..\..\src\libsass\src\utf8_string.cpp ..\..\src\libsass\src\util.cpp ..\..\src\libsass\src\values.cpp
2020-01-29T13:34:15.6521162Z cl : Command line warning D9025: overriding '/GR-' with '/GR' [D:\a\1\s\src\Ministryweb\node_modules\node-sass\build\src\libsass.vcxproj]
2020-01-29T13:34:15.6521358Z cl : Command line warning D9025: overriding '/GR-' with '/GR' [D:\a\1\s\src\Ministryweb\node_modules\node-sass\build\src\libsass.vcxproj]
2020-01-29T13:34:15.6521493Z ast.cpp
2020-01-29T13:34:15.6521625Z cl : Command line warning D9025: overriding '/GR-' with '/GR' [D:\a\1\s\src\Ministryweb\node_modules\node-sass\build\src\libsass.vcxproj]
-- ABBREVIATED --
2020-01-29T13:34:15.7628892Z 11784 silly postinstall sass-graph#2.2.4
2020-01-29T13:34:15.7628923Z 11785 info lifecycle sass-graph#2.2.4~postinstall: sass-graph#2.2.4
2020-01-29T13:34:15.7628952Z 11786 silly postinstall node-sass#4.9.0
2020-01-29T13:34:15.7628986Z 11787 info lifecycle node-sass#4.9.0~postinstall: node-sass#4.9.0
2020-01-29T13:34:15.7629016Z 11788 verbose lifecycle node-sass#4.9.0~postinstall: unsafe-perm in lifecycle true
2020-01-29T13:34:15.7629354Z 11789 verbose lifecycle node-sass#4.9.0~postinstall: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\a\1\s\src\Ministryweb\node_modules\node-sass\node_modules\.bin;D:\a\1\s\src\Ministryweb\node_modules\.bin;C:\hostedtoolcache\windows\NuGet\4.4.1\x64;C:\agents\2.164.6\externals\git\cmd;C:/hostedtoolcache/windows\Python\3.6.8\x64;C:/hostedtoolcache/windows\Python\3.6.8\x64\Scripts;C:\Program Files\Mercurial\;C:\ProgramData\kind;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS\;C:\Program Files\Mercurial\;C:\Program Files\Boost\1.69.0;C:\Program Files\dotnet;C:\mysql-5.7.21-winx64\bin;C:\Program Files\Java\zulu-8-azure-jdk_8.40.0.25-8.0.222-win_x64\bin;C:\Program Files (x86)\sbt\bin;C:\Rust\.cargo\bin;C:\hostedtoolcache\windows\Ruby\2.5.7\x64\bin;C:\Go1.12.7\bin;C:\hostedtoolcache\windows\Python\3.6.8\x64\Scripts;C:\hostedtoolcache\windows\Python\3.6.8\x64;C:\npm\prefix;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Microsoft MPI\Bin\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\Chocolatey\bin;C:\Program Files\Docker;C:\Program Files\PowerShell\6\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;c:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\Subversion\bin;C:\SeleniumWebDrivers\ChromeDriver\;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.2\bin;C:\Program Files\CMake\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\OpenSSL\bin;C:\Users\VssAdministrator\.dotnet\tools;C:\Program Files (x86)\Microsoft SQL Server\13
2020-01-29T13:34:15.7629678Z 11790 verbose lifecycle node-sass#4.9.0~postinstall: CWD: D:\a\1\s\src\Ministryweb\node_modules\node-sass
2020-01-29T13:34:15.7629714Z 11791 silly lifecycle node-sass#4.9.0~postinstall: Args: [ '/d /s /c', 'node scripts/build.js' ]
2020-01-29T13:34:15.7629751Z 11792 silly lifecycle node-sass#4.9.0~postinstall: Returned: code: 1 signal: null
2020-01-29T13:34:15.7629793Z 11793 info lifecycle node-sass#4.9.0~postinstall: Failed to exec postinstall script
2020-01-29T13:34:15.7629823Z 11794 timing action:postinstall Completed in 95942ms
2020-01-29T13:34:15.7629857Z 11795 verbose unlock done using C:\npm\cache\_locks\staging-30fa0784d58eff0a.lock for D:\a\1\s\src\Ministryweb\node_modules\.staging
2020-01-29T13:34:15.7629894Z 11796 timing stage:rollbackFailedOptional Completed in 628ms
2020-01-29T13:34:15.7629930Z 11797 timing stage:runTopLevelLifecycles Completed in 114608ms
-- ABBREVIATED --
2020-01-29T13:34:15.7646802Z 11798 silly saveTree `-- node-sass#4.9.0
2020-01-29T13:34:15.7646831Z 11799 verbose stack Error: node-sass#4.9.0 postinstall: `node scripts/build.js`
2020-01-29T13:34:15.7646859Z 11799 verbose stack Exit status 1
2020-01-29T13:34:15.7646897Z 11799 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
2020-01-29T13:34:15.7646933Z 11799 verbose stack at EventEmitter.emit (events.js:223:5)
2020-01-29T13:34:15.7646967Z 11799 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
2020-01-29T13:34:15.7647002Z 11799 verbose stack at ChildProcess.emit (events.js:223:5)
2020-01-29T13:34:15.7647032Z 11799 verbose stack at maybeClose (internal/child_process.js:1021:16)
2020-01-29T13:34:15.7647068Z 11799 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
2020-01-29T13:34:15.7647101Z 11800 verbose pkgid node-sass#4.9.0
2020-01-29T13:34:15.7647129Z 11801 verbose cwd D:\a\1\s\src\Ministryweb
2020-01-29T13:34:15.7647157Z 11802 verbose Windows_NT 10.0.14393
2020-01-29T13:34:15.7647190Z 11803 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
2020-01-29T13:34:15.7647228Z 11804 verbose node v12.14.1
2020-01-29T13:34:15.7647255Z 11805 verbose npm v6.13.4
2020-01-29T13:34:15.7647282Z 11806 error code ELIFECYCLE
2020-01-29T13:34:15.7647311Z 11807 error errno 1
2020-01-29T13:34:15.7647341Z 11808 error node-sass#4.9.0 postinstall: `node scripts/build.js`
2020-01-29T13:34:15.7647369Z 11808 error Exit status 1
2020-01-29T13:34:15.7647397Z 11809 error Failed at the node-sass#4.9.0 postinstall script.
2020-01-29T13:34:15.7647432Z 11809 error This is probably not a problem with npm. There is likely additional logging output above.
2020-01-29T13:34:15.7647466Z 11810 verbose exit [ 1, true ]
2020-01-29T13:34:15.7647484Z
2020-01-29T13:34:15.7690666Z ##[error]Error: Npm failed with return code: 1
2020-01-29T13:34:15.7699335Z ##[section]Finishing: npm install
This seems to be an error compiling Python code but beyond that, I'm at sea here. Any ideas why this may have started failing suddenly? Is there anything I can do to fix it?
I'm using Azure Hosted builds

I have managed to solve this.
It appears that the issue occurs because the build process uses something called node_gyp. Apparently this stopped working after node 11.x and node 12 is now the default node that Azure DevOps is using (or is at the time of writing).
I was able to rectify the problem by adding a build step to the Pipeline to install node 8.x - After that all worked fine.
Looks like upgrading node-sass should also fix it (but wary of this given the age of the project so not an ideal solution)...
https://github.com/nodejs/node-gyp/issues/1763 (link for additional info on underlying node-gyp compatibility problems)

Related

npm error E401: Unable to authenticate, need: Basic realm="GitHub"

I have an issue with node v10.15.1 and npm v6.14.15
Running npm install into the root folder of a project, I have the following error:
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub"
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/myuser/.npm/_logs/2022-08-10T17_31_09_840Z-debug.log
The log file reports this:
2675 verbose stack Error: Unable to authenticate, need: Basic realm="GitHub"
2675 verbose stack at res.buffer.catch.then.body (/Users/myuser/.nvm/versions/node/v10.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:107:17)
2675 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
2676 verbose statusCode 401
2677 verbose pkgid socket.io-client#https://github.com/substack/socket.io-client/tarball/master
2678 verbose cwd /Users/myuser/myproject
2679 verbose Darwin 20.6.0
2680 verbose argv "/Users/myuser/.nvm/versions/node/v10.15.1/bin/node" "/Users/myuser/.nvm/versions/node/v10.15.1/bin/npm" "install"
2681 verbose node v10.15.1
2682 verbose npm v6.14.15
2683 error code E401
2684 error Unable to authenticate, need: Basic realm="GitHub"
2685 verbose exit [ 1, true ]
I have other projects that compile perfectly with node v10.15.1 and npm v6.14.15
Any help will be appreciated.
Thanks
I solved this problem by myself.
If you have a similar issue, check in your npm configurations if you have the option always-auth=true, typing:
npm config list
In my case, I had :
; userconfig /Users/myuser/.npmrc
always-auth = true
In order to bypass this problem, create a .npmrc file in the root folder of your project and force the property to false:
always-auth = false
Now, npm config list should show you something like this:
; project config /Users/myuser/myproject/.npmrc
always-auth = false
With this configuration you should solve the E401 Basic realm="GitHub"

when using "NPM install " to my ionic app, it gives such error , which has almost no reference in stackoverflow or github. I have no clue, what to do

npm WARN tarball tarball data for igniteui-cli#4.2.4
(sha512-jVspYOn9TmzxIbfkpw6TEVbGJeZXLWHWJfQcpd9qcRXpvrnwMqBnBrP7x/CX01NiXlpYey1xxa5PMn3Eu+OYDw==)
seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for igniteui-cli#4.2.4
(sha512-jVspYOn9TmzxIbfkpw6TEVbGJeZXLWHWJfQcpd9qcRXpvrnwMqBnBrP7x/CX01NiXlpYey1xxa5PMn3Eu+OYDw==)
seems to be corrupted. Trying one more time.
Getting this error like it is in a loop... Uhhh
Here is the debug log..
0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli
'C:\Program Files\nodejs\node.exe', 1 verbose cli
'C:\Users\Rakesh\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' 1 verbose cli ] 2 info using npm#6.14.2 3 info
using node#v12.16.1 4 verbose run-script [ 'prestart', 'start',
'poststart' ] 5 info lifecycle privet#0.0.1~prestart: privet#0.0.1 6
info lifecycle privet#0.0.1~start: privet#0.0.1 7 verbose lifecycle
privet#0.0.1~start: unsafe-perm in lifecycle true 8 verbose lifecycle
privet#0.0.1~start: PATH:
C:\Users\Rakesh\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;I:\Pri-Vet\PriVet_App\node_modules.bin;C:\Program
Files (x86)\Common
Files\Oracle\Java\javapath;C:\ProgramData\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\Git\bin;C:\xampp\php;C:\Gradle\gradle-4.6\bin;C:\composer;C:\Program
Files\dotnet;C:\Program Files\Microsoft SQL
Server\130\Tools\Binn;C:\Program
Files\Java\jdk1.8.0_40\bin;C:\Program Files\Microsoft VS
Code\bin;C:\Program
Files\MongoDB\Server\4.0\bin;;C:\WINDOWS\System32\OpenSSH;C:\Program
Files\nodejs;C:\Users\Rakesh.windows-build-tools\python27;C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Rakesh\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules.bin;C:\Users\Rakesh\AppData\Roaming\npm\node_modules.bin;C:\Program
Files (x86)\Common
Files\Oracle\Java\javapath;C:\ProgramData\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\Git\bin;C:\xampp\php;C:\Gradle\gradle-4.6\bin;C:\composer;C:\Program
Files\dotnet;C:\Program Files\Microsoft SQL
Server\130\Tools\Binn;C:\Program
Files\Java\jdk1.8.0_40\bin;C:\Program Files\Microsoft VS
Code\bin;C:\Program Files\nodejs;C:\Program
Files\MongoDB\Server\4.0\bin;C:\Users\Rakesh\AppData\Roaming\Composer\vendor\bin;C:\Users\Rakesh\AppData\Local\Microsoft\WindowsApps;C:\Users\Rakesh.dotnet\tools;C:\Users\Rakesh\AppData\Local\Microsoft\WindowsApps;C:\Users\Rakesh\AppData\Roaming\npm;C:\Users\Rakesh\App;C:\Users\Rakesh\AppData\Local\Programs\Microsoft
VS Code\bin 9 verbose lifecycle privet#0.0.1~start: CWD:
I:\Pri-Vet\PriVet_App 10 silly lifecycle privet#0.0.1~start: Args: [
'/d /s /c', 'ionic serve' ] 11 silly lifecycle privet#0.0.1~start:
Returned: code: 1 signal: null 12 info lifecycle privet#0.0.1~start:
Failed to exec start script 13 verbose stack Error: privet#0.0.1
start: ionic serve 13 verbose stack Exit status 1 13 verbose stack
at EventEmitter.
(C:\Users\Rakesh\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:311:20) 13
verbose stack at ChildProcess.
(C:\Users\Rakesh\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:311:20) 13
verbose stack at maybeClose (internal/child_process.js:1021:16) 13
verbose stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:286:5) 14 verbose pkgid privet#0.0.1 15
verbose cwd I:\Pri-Vet\PriVet_App 16 verbose Windows_NT 10.0.17134 17
verbose argv "C:\Program Files\nodejs\node.exe"
"C:\Users\Rakesh\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js"
"start" 18 verbose node v12.16.1 19 verbose npm v6.14.2 20 error code
ELIFECYCLE 21 error errno 1 22 error privet#0.0.1 start: ionic serve
22 error Exit status 1 23 error Failed at the privet#0.0.1 start
script. 23 error This is probably not a problem with npm. There is
likely additional logging output above. 24 verbose exit [ 1, true ]

Unable to deploy CAP application to Cloud Foundry

I have been developing an application using Cloud Application Programming Model (Node.js), following this tutorial:
https://github.com/SAP-samples/cloud-cap-nodejs-codejam
Unfortunately, I am unable to deploy it to the Cloud Foundry. I also created the app (bookshop) from the tutorial above to check if I get the same error and I did.
The error looks as follows and it occurs when I try to execute npm run build:mta command from exercise 10.
[2020-11-03 15:29:43] INFO executing the "make -f Makefile_20201103152943.mta p=cf mtar= strict=true mode=" command...
[2020-11-03 15:29:45] INFO validating the MTA project
[2020-11-03 15:29:45] ERROR the "mta.yaml" file is not valid:
line 28: the "srv-binding" property set required by the "bookshop-ui" module is not defined
line 34: the "url" property of the "bookshop-ui" module is unresolved; the "srv-binding/srv-url" property is not provided
make: *** [Makefile_20201103152943.mta:26: pre_validate] Error 1
Error: could not build the MTA project: could not execute the "make -f Makefile_20201103152943.mta p=cf mtar= strict=true mode=" command: exit status 2
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bookshop#1.0.0 build:mta: `cds build/all && mbt build -p=cf`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bookshop#1.0.0 build:mta script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Full debug log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\XXXXX\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build:mta'
1 verbose cli ]
2 info using npm#6.14.8
3 info using node#v12.19.0
4 verbose run-script [ 'prebuild:mta', 'build:mta', 'postbuild:mta' ]
5 info lifecycle bookshop#1.0.0~prebuild:mta: bookshop#1.0.0
6 info lifecycle bookshop#1.0.0~build:mta: bookshop#1.0.0
7 verbose lifecycle bookshop#1.0.0~build:mta: unsafe-perm in lifecycle true
8 verbose lifecycle bookshop#1.0.0~build:mta: PATH: C:\Users\XXXXX\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\XXXXX\Desktop\SAPProject\bookshop\node_modules\.bin;C:\Program Files\Java\jdk1.8.0_172\bin;C:\Program Files\Java\jre1.8.0_172\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:\WINDOWS\System32\OpenSSH\;C:\Program Files\apache-maven-3.6.3\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\PuTTY\;C:\Program Files\OpenJDK12\Bin;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Python\Python37\Scripts\;C:\Python\Python37\;C:\Users\XXXXXX\AppData\Local\Microsoft\WindowsApps;C:\Users\XXXXXX\AppData\Roaming\Cloud Foundry;C:\Users\XXXXX\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\XXXXXX\AppData\Roaming\npm;C:\Users\XXXXXX\AppData\Local\Programs\Git\cmd;
9 verbose lifecycle bookshop#1.0.0~build:mta: CWD: C:\Users\XXXXX\Desktop\SAPProject\bookshop
10 silly lifecycle bookshop#1.0.0~build:mta: Args: [ '/d /s /c', 'cds build/all && mbt build -p=cf' ]
11 silly lifecycle bookshop#1.0.0~build:mta: Returned: code: 1 signal: null
12 info lifecycle bookshop#1.0.0~build:mta: Failed to exec build:mta script
13 verbose stack Error: bookshop#1.0.0 build:mta: `cds build/all && mbt build -p=cf`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\XXXXX\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\XXXXXX\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid bookshop#1.0.0
15 verbose cwd C:\Users\XXXXX\Desktop\SAPProject\bookshop
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\XXXXX\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:mta"
18 verbose node v12.19.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error bookshop#1.0.0 build:mta: `cds build/all && mbt build -p=cf`
22 error Exit status 1
23 error Failed at the bookshop#1.0.0 build:mta script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
mta.yml file - exactly the same as in the tutorial
## Generated mta.yaml based on template version 0.4.0
## appName = bookshop
## language=nodejs; multiTenant=false
## approuter=
_schema-version: '3.1'
ID: bookshop
version: 1.0.0
description: "A simple CAP project."
parameters:
enable-parallel-deployments: true
build-parameters:
before-all:
- builder: custom
commands:
- npm install --production
- npx -p #sap/cds-dk cds build --production
modules:
############## UI MODULE ##########################
- name: bookshop-ui
type: nodejs
path: app
parameters:
memory: 256M
disk-quota: 256M
requires:
- name: srv-binding
group: destinations
properties:
forwardAuthToken: true
strictSSL: true
name: srv-binding
url: ~{srv-url}
# --------------------- SERVER MODULE ------------------------
- name: bookshop-srv
# ------------------------------------------------------------
type: nodejs
path: gen/srv
requires:
# Resources extracted from CAP configuration
- name: bookshop-db
provides:
- name: srv-api # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: ${default-url}
# -------------------- SIDECAR MODULE ------------------------
- name: bookshop-db-deployer
# ------------------------------------------------------------
type: hdb
path: gen/db
parameters:
buildpack: nodejs_buildpack
requires:
# 'hana' and 'xsuaa' resources extracted from CAP configuration
- name: bookshop-db
resources:
# services extracted from CAP configuration
# 'service-plan' can be configured via 'cds.requires.<name>.vcap.plan'
# ------------------------------------------------------------
- name: bookshop-db
# ------------------------------------------------------------
type: com.sap.xs.hdi-container
parameters:
service: hanatrial # or 'hanatrial' on trial landscapes
service-plan: hdi-shared
properties:
hdi-service-name: ${service-name}
Has anyone encountered this issue as well? Any help will be very much appreciated.
The command which you are using to build mta for your project - npm run build:mta internally makes use of SAP Cloud MTA Build Tool, called as MBT in short. MBT makes use of GNU Make internally, as specified here. Try to follow the instructions here to install GNU Make and then try again to build mta for your project using the same command - npm run build:mta. It will build successfully.

Am I missing a dependency for MEAN.io?

I reviewed Stack Overflow and did some Googling before posting.
I have a fresh installation of Win10. I installed Node.js(v8.12.0) and npm(v6.4.1). I followed the mean.io installation commands:
$ git clone https://github.com/linnovate/mean.git
$ cd mean
$ npm install && npm start
I received several error outputs (will post below). I then proceeded to http://mean.io/2017/10/31/getting-started-mean-io/ and realized I needed to install MongoDB. I used the following https://www.mongodb.com/download-center#community I restarted my computer and I still have the same output:
> mean#0.0.0 start C:\Users\reese\mean
> concurrently -c 'yellow.bold,green.bold' -n 'SERVER,BUILD' 'nodemon server' 'ng build --watch'
['SERVER] 'nodemo' is not recognized as an internal or external command,
['SERVER] operable program or batch file.
[BUILD'] 'server'' is not recognized as an internal or external command,
[BUILD'] operable program or batch file.
[] 'n' is not recognized as an internal or external command,
[] operable program or batch file.
[] 'build' is not recognized as an internal or external command,
[] operable program or batch file.
[] build exited with code 1
[] n exited with code 1
[BUILD'] server' exited with code 1
['SERVER] nodemo exited with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mean#0.0.0 start: `concurrently -c 'yellow.bold,green.bold' -n 'SERVER,BUILD' 'nodemon server' 'ng build --watch'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mean#0.0.0 start 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\reese\AppData\Roaming\npm-cache\_logs\2018-10-02T01_13_58_380Z-debug.log
I can share the full debug.log if necessary.
EDIT: FULL LOG BELOW
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 'start' ]
2 info using npm#6.4.1
3 info using node#v8.12.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle mean#0.0.0~prestart: mean#0.0.0
6 info lifecycle mean#0.0.0~start: mean#0.0.0
7 verbose lifecycle mean#0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle mean#0.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\reese\mean\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:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\reese\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\reese\AppData\Local\Programs\Python\Python37-32\;C:\Users\reese\AppData\Local\Microsoft\WindowsApps;C:\Users\reese\AppData\Roaming\npm
9 verbose lifecycle mean#0.0.0~start: CWD: C:\Users\reese\mean
10 silly lifecycle mean#0.0.0~start: Args: [ '/d /s /c',
10 silly lifecycle 'concurrently -c \'yellow.bold,green.bold\' -n \'SERVER,BUILD\' \'nodemon server\' \'ng build --watch\'' ]
11 silly lifecycle mean#0.0.0~start: Returned: code: 1 signal: null
12 info lifecycle mean#0.0.0~start: Failed to exec start script
13 verbose stack Error: mean#0.0.0 start: `concurrently -c 'yellow.bold,green.bold' -n 'SERVER,BUILD' 'nodemon server' 'ng build --watch'`
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 mean#0.0.0
15 verbose cwd C:\Users\reese\mean
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v8.12.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error mean#0.0.0 start: `concurrently -c 'yellow.bold,green.bold' -n 'SERVER,BUILD' 'nodemon server' 'ng build --watch'`
22 error Exit status 1
23 error Failed at the mean#0.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

UCD WAS Config plugin can't find the WAS installation

My WAS 8.5 is installed in C:\Program Files(x86)\IBM\WebSphere\AppServer\bin\wsadmin.bat. How can I tell the discovery process to look at my installation location?
plugin: WAS - Deploy, id: com.urbancode.air.plugin.WebSphere, version: 98
plugin command: 'cmd' '/C' '""C:\Program Files\ibm-ucd\agent\opt\groovy-1.8.8\bin\groovy" -cp "C:\Program Files\ibm-ucd\agent\var\plugins\com.urbancode.air.plugin.WebSphere_98_b9f10d322ce14ba5b38aa4757ce3ac59f5ec7643b2b922935ccab03536b404a2\classes;C:\Program Files\ibm-ucd\agent\var\plugins\com.urbancode.air.plugin.WebSphere_98_b9f10d322ce14ba5b38aa4757ce3ac59f5ec7643b2b922935ccab03536b404a2\lib\uDeployRestClient.jar;C:\Program Files\ibm-ucd\agent\var\plugins\com.urbancode.air.plugin.WebSphere_98_b9f10d322ce14ba5b38aa4757ce3ac59f5ec7643b2b922935ccab03536b404a2\lib\jettison-1.1.jar" "C:\Program Files\ibm-ucd\agent\var\plugins\com.urbancode.air.plugin.WebSphere_98_b9f10d322ce14ba5b38aa4757ce3ac59f5ec7643b2b922935ccab03536b404a2\wasDiscovery.groovy" "C:\Program Files\ibm-ucd\agent\var\temp\logs8306861047267428227\input.props" "C:\Program Files\ibm-ucd\agent\var\temp\logs8306861047267428227\output.props""'
working directory: C:\Program Files\ibm-ucd\agent\var\temp
properties:
PLUGIN_INPUT_PROPS=C:\Program Files\ibm-ucd\agent\var\temp\logs8306861047267428227\input.props
PLUGIN_OUTPUT_PROPS=C:\Program Files\ibm-ucd\agent\var\temp\logs8306861047267428227\output.props
pathOverride=
profilePathAgent=
profilePathResource=
resourcePath=/Topology Discovery/T500
environment:
AGENT_HOME=C:\Program Files\ibm-ucd\agent
AH_WEB_URL=https://localhost:8443
AUTH_TOKEN=****
DS_SYSTEM_ENCODING=Cp1252
JAVA_OPTS=-Dfile.encoding=Cp1252 -Dconsole.encoding=Cp1252
PLUGIN_HOME=C:\Program Files\ibm-ucd\agent\var\plugins\com.urbancode.air.plugin.WebSphere_98_b9f10d322ce14ba5b38aa4757ce3ac59f5ec7643b2b922935ccab03536b404a2
UD_DIALOGUE_ID=4f5c360e-69e0-4f52-87e0-6dfc6b5e01a1
================================================================================
**Checking path for WebSphere install: C:\Program Files\IBM\WebSphere\AppServer\bin\wsadmin.bat
Checking path for WebSphere install: C:\IBM\WebSphere\AppServer\bin\wsadmin.bat
WebSphere installation not found. Ending discovery process.**
Set the wsadmin.path property on the agent resource to the location of the wsadmin file. See step 2 in the following document:
https://www.ibm.com/support/knowledgecenter/SS4GSP_6.2.2/com.ibm.udeploy.doc/topics/resources_import_was.html