Am I missing a dependency for MEAN.io? - 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 ]

Related

Azure Data Factory CI npm validate step suddenly crashing

We've been using the "new" CICD setup for Azure Data Factory as descibed by the documentation page: https://learn.microsoft.com/en-us/azure/data-factory/continuous-integration-delivery-improvements. We're doing this using Azure DevOps pipelines written in YAML.
This has been working quite well for us, until it suddenly started crashing at the validation step this morning. No code has been changed on our side. I'm wondering if there's some issue with version number or incompatability but I can't find anything.
The Azure YAML code in question is this:
- task: Npm#1
displayName: 'Validate ADF json'
inputs:
command: 'custom'
workingDir: $(packageJsonFolder)
customCommand: 'run build validate $(Build.Repository.LocalPath)/DataFactories/${{ parameters.folderName }} $(adfAzureResourceId)'
The full log of error messages is as following:
node /home/vsts/work/1/s/DataFactories/downloads/main.js validate /home/vsts/work/1/s/DataFactories/internaldataload /subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx
/home/vsts/work/1/s/DataFactories/node_modules/#microsoft/azure-data-factory-utilities/lib/bundle.manager.js:53
throw "Execution failed with exit code: " + exitCode;
^
Execution failed with exit code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # build: `node node_modules/#microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # 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/vsts/.npm/_logs/2022-06-16T09_04_15_237Z-debug.log
=====ERROR=====
Error: Command failed: node /home/vsts/work/1/s/DataFactories/downloads/main.js validate /home/vsts/work/1/s/DataFactories/internaldataload /subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx
/home/vsts/work/1/s/DataFactories/downloads/main.js:2
(()=>{var e={82257:(e,t,r)=>{e.exports=r(53605)
at Object.94616 (/home/vsts/work/1/s/DataFactories/downloads/main.js:2:4897020)
at r (/home/vsts/work/1/s/DataFactories/downloads/main.js:2:7274976)
at /home/vsts/work/1/s/DataFactories/downloads/main.js:2:7275513
at /home/vsts/work/1/s/DataFactories/downloads/main.js:2:7953499
at Object.<anonymous> (/home/vsts/work/1/s/DataFactories/downloads/main.js:2:7953503)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Execution finished....
Found npm debug log, make sure the path matches with the one in npm's output: /home/vsts/.npm/_logs/2022-06-16T09_04_15_237Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/opt/hostedtoolcache/node/10.24.1/x64/bin/node',
1 verbose cli '/opt/hostedtoolcache/node/10.24.1/x64/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build',
1 verbose cli 'validate',
1 verbose cli '/home/vsts/work/1/s/DataFactories/internaldataload',
1 verbose cli '/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx' ]
2 info using npm#6.14.12
3 info using node#v10.24.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle #~prebuild: #
6 info lifecycle #~build: #
7 verbose lifecycle #~build: unsafe-perm in lifecycle true
8 verbose lifecycle #~build: PATH: /opt/hostedtoolcache/node/10.24.1/x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/vsts/work/1/s/DataFactories/node_modules/.bin:/opt/hostedtoolcache/node/10.24.1/x64/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/vsts/.local/bin:/opt/pipx_bin:/home/vsts/.cargo/bin:/home/vsts/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/vsts/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle #~build: CWD: /home/vsts/work/1/s/DataFactories
10 silly lifecycle #~build: Args: [ '-c',
10 silly lifecycle 'node node_modules/#microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"' ]
11 silly lifecycle #~build: Returned: code: 1 signal: null
12 info lifecycle #~build: Failed to exec build script
13 verbose stack Error: # build: `node node_modules/#microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/opt/hostedtoolcache/node/10.24.1/x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/opt/hostedtoolcache/node/10.24.1/x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid #
15 verbose cwd /home/vsts/work/1/s/DataFactories
16 verbose Linux 5.13.0-1029-azure
17 verbose argv "/opt/hostedtoolcache/node/10.24.1/x64/bin/node" "/opt/hostedtoolcache/node/10.24.1/x64/bin/npm" "run" "build" "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"
18 verbose node v10.24.1
19 verbose npm v6.14.12
20 error code ELIFECYCLE
21 error errno 1
22 error # build: `node node_modules/#microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"`
22 error Exit status 1
23 error Failed at the # build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
##[error]Error: Npm failed with return code: 1
Finishing: Validate ADF json
Our package.json file is exactly as from the documentation page.
{
"scripts":{
"build":"node node_modules/#microsoft/azure-data-factory-utilities/lib/index"
},
"dependencies":{
"#microsoft/azure-data-factory-utilities":"^0.1.5"
}
}
Any ideas what we can do?
Fixed after updating the 'Install Node.js' task to match the reference from doc:
# Installs Node and the npm packages saved in your package.json file in the build
- task: NodeTool#0
inputs:
versionSpec: '14.x'
displayName: 'Install Node.js'

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.

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

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)

Not able to Quick Start on Theia

I am trying to create PoC using theia. Going through
https://github.com/theia-ide/theia/blob/master/doc/Developing.md
Running it on Ubuntu 16.04. git clone https://github.com/theia-ide/theia is done. But when I am trying to run yarn; I am getting following errors:
ubuntu#ip-172-30-0-179:~/theia/theia$ yarn
yarn install v1.9.4
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ yarn rebuild:clean && yarn build:clean
yarn run v1.9.4
$ rimraf .browser_modules
Done in 0.20s.
yarn run v1.9.4
$ run prepare
lerna info version 2.11.0
#theia/ext-scripts: $ echo 'skip'
#theia/ext-scripts: skip
#theia/application-package: $ yarn run clean && yarn run build
#theia/plugin: $ yarn run clean && yarn run build
#theia/application-package: $ theiaext clean
#theia/plugin: $ theiaext clean
#theia/application-package: $ theiaext build
#theia/plugin: $ theiaext build
#theia/plugin: [compile] Killed
#theia/plugin: [compile] theiaext compile exited with code 137
#theia/plugin: [lint] Killed
#theia/plugin: [lint] theiaext lint exited with code 137
#theia/plugin: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#theia/plugin: error Command failed with exit code 1.
#theia/plugin: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#theia/plugin: error Command failed with exit code 1.
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: yarn run prepare
lerna ERR! error Command failed with exit code 1.
lerna ERR! error Command failed with exit code 1.
lerna ERR!
lerna ERR! $ yarn run clean && yarn run build
lerna ERR! $ theiaext clean
lerna ERR! $ theiaext build
lerna ERR! [compile] Killed
lerna ERR! [compile] theiaext compile exited with code 137
lerna ERR! [lint] Killed
lerna ERR! [lint] theiaext lint exited with code 137
lerna ERR! info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR!
lerna ERR! at Promise.all.then.arr (/home/ubuntu/theia/theia/node_modules/lerna/node_modules/execa/index.js:236:11)
lerna ERR! at <anonymous>
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
#theia/application-package: [lint] theiaext lint exited with code 0
#theia/application-package: [compile] theiaext compile exited with code 0
{ Error: Command failed: yarn run prepare
error Command failed with exit code 1.
error Command failed with exit code 1.
$ yarn run clean && yarn run build
$ theiaext clean
$ theiaext build
[compile] Killed
[compile] theiaext compile exited with code 137
[lint] Killed
[lint] theiaext lint exited with code 137
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
at Promise.all.then.arr (/home/ubuntu/theia/theia/node_modules/lerna/node_modules/execa/index.js:236:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
code: 1,
killed: false,
stdout: '$ yarn run clean && yarn run build\n$ theiaext clean\n$ theiaext build\n[compile] Killed\n[compile] theiaext compile exited with code 137\n[lint] Killed\n[lint] theiaext lint exited with code 137\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n',
stderr: 'error Command failed with exit code 1.\nerror Command failed with exit code 1.\n',
failed: true,
signal: null,
cmd: 'yarn run prepare',
timedOut: false,
exitCode: 1 }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
After increasing memory; I am getting following error:
error /home/ubuntu/theia/node_modules/vscode-nsfw: Command failed.
Exit code: 1
Full console is:
ubuntu#ip-10-169-135-35:~/theia$ yarn
yarn install v1.9.4
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/1648(node:4457) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
warning monaco-languageclient#0.9.0: The engine "vscode" appears to be invalid.
warning vscode-base-languageclient#4.4.0: The engine "vscode" appears to be invalid.
info fsevents#1.2.4: The platform "linux" is incompatible with this module.
info "fsevents#1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > istanbul-instrumenter-loader#3.0.1" has unmet peer dependency "webpack#^2.0.0 || ^3.0.0 || ^4.0.0".
warning "workspace-aggregator-e2635a1a-c6a1-46eb-92c2-8d23c5dea8b0 > #theia/application-manager > font-awesome-webpack#0.0.5-beta.2" has unmet peer dependency "font-awesome#>=4.3.0".
[5/5] Building fresh packages...
[1/9] ⠄ fibers
[7/9] ⠄ dugite
[3/9] ⡀ electron
[4/9] ⡀ vscode-nsfw
error /home/ubuntu/theia/node_modules/vscode-nsfw: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /home/ubuntu/theia/node_modules/vscode-nsfw
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp#3.8.0
gyp info using node#10.10.0 | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/home/ubuntu/theia/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/ubuntu/theia/node_modules/vscode-nsfw/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/ubuntu/theia/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/ubuntu/.node-gyp/10.10.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/ubuntu/.node-gyp/10.10.0',
gyp info spawn args '-Dnode_gyp_dir=/home/ubuntu/theia/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/ubuntu/.node-gyp/10.10.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/ubuntu/theia/node_modules/vscode-nsfw',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/home/ubuntu/theia/node_modules/vscode-nsfw/build'
CXX(target) Release/obj.target/nsfw/src/NSFW.o
../src/NSFW.cpp: In static member function ‘static void NSFW::fireErrorCallback(uv_async_t*)’:
../src/NSFW.cpp:56:44: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated (declared at ../../nan/nan.h:1618) [-Wdeprecated-declarations]
baton->nsfw->mErrorCallback->Call(1, argv);
^
../src/NSFW.cpp: In static member function ‘static void NSFW::fireEventCallback(uv_async_t*)’:
../src/NSFW.cpp:98:44: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated (declared at ../../nan/nan.h:1618) [-Wdeprecated-declarations]
baton->nsfw->mEventCallback->Call(1, argv);
^
../src/NSFW.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE NSFW::JSNew(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/NSFW.cpp:159:49: error: no matching function for call to ‘v8::Function::NewInstance()’
info.GetReturnValue().Set(cons->NewInstance());
^
../src/NSFW.cpp:159:49: note: candidates are:
In file included from /home/ubuntu/.node-gyp/10.10.0/include/node/node.h:63:0,
from ../../nan/nan.h:51,
from ../src/../includes/NSFW.h:5,
from ../src/NSFW.cpp:1:
/home/ubuntu/.node-gyp/10.10.0/include/node/v8.h:3989:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/home/ubuntu/.node-gyp/10.10.0/include/node/v8.h:3989:44: note: candidate expects 3 arguments, 0 provided
/home/ubuntu/.node-gyp/10.10.0/include/node/v8.h:3992:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/home/ubuntu/.node-gyp/10.10.0/include/node/v8.h:3992:44: note: candidate expects 1 argument, 0 provided
../src/NSFW.cpp:177:54: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /home/ubuntu/.node-gyp/10.10.0/include/node/v8.h:2887): Use Isolate version [-Wdeprecated-declarations]
v8::String::Utf8Value utf8Value(info[1]->ToString());
^
../src/NSFW.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE NSFW::Start(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/NSFW.cpp:208:27: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated (declared at ../../nan/nan.h:1618) [-Wdeprecated-declarations]
callback->Call(1, argv);
^
../src/NSFW.cpp: In member function ‘virtual void NSFW::StartWorker::HandleOKCallback()’:
../src/NSFW.cpp:254:27: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated (declared at ../../nan/nan.h:1618) [-Wdeprecated-declarations]
callback->Call(1, argv);
^
../src/NSFW.cpp:256:27: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated (declared at ../../nan/nan.h:1618) [-Wdeprecated-declarations]
callback->Call(0, NULL);
^
../src/NSFW.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE NSFW::Stop(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/NSFW.cpp:281:27: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated (declared at ../../nan/nan.h:1618) [-Wdeprecated-declarations]
callback->Call(1, argv);
^
../src/NSFW.cpp: In member function ‘virtual void NSFW::StopWorker::HandleOKCallback()’:
../src/NSFW.cpp:323:25: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated (declared at ../../nan/nan.h:1618) [-Wdeprecated-declarations]
callback->Call(0, NULL);
^
make: *** [Release/obj.target/nsfw/src/NSFW.o] Error 1
make: Leaving directory `/home/ubuntu/theia/node_modules/vscode-nsfw/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/ubuntu/theia/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 3.13.0-86-generic
gyp ERR! command "/usr/local/bin/node" "/home/ubuntu/theia/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /home/ubuntu/theia/node_modules/vscode-nsfw
Any help is highly appreciated.
This is actually not solved by me but by #kittaakos ( guys who have created this awesome platform theia)
So, to summarize :
Make sure your VM has enough RAM like 4 GB.. It might even work with 2 GB. So, if you are getting exit code 137; try upgrading RAM.
It works like a charm on Node.js 8.11.4
By default it starts on localhost for security considerations. If you want it to be exposed via external IP; use
$ yarn run start --hostname 0.0.0.0