Azure Data Factory CI npm validate step suddenly crashing - azure-devops

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'

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 ]

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