Cannot build VS Code from sources - Windows - visual-studio-code

I cloned Visual Studio Code sources and followed the instructions for contributors from the link - https://github.com/Microsoft/vscode/wiki/How-to-Contribute but When I run yarn I'm getting the following error:
error C:\_LAB_\vscode\node_modules\native-keymap: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\_LAB_\vscode\node_modules\native-keymap
Output:
C:\_LAB_\vscode\node_modules\native-keymap>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp#3.6.2
gyp info using node#8.11.1 | win32 | x64
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=2015',
gyp info spawn args '-I',
gyp info spawn args 'C:\\_LAB_\\vscode\\node_modules\\native-keymap\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Maga\\.node-gyp\\iojs-1.7.12\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\Maga\\.node-gyp\\iojs-1.7.12',
gyp info spawn args '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\Maga\\.node-gyp\\iojs-1.7.12\\<(target_arch)\\iojs.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\_LAB_\\vscode\\node_modules\\native-keymap',
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 'C:\\_LAB_\\vscode\\node_modules\\native-keymap\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn msbuild
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
C:\_LAB_\vscode\node_modules\native-keymap\build\keymapping.vcxproj : error MSB4057: Target element "Build" does not exist in project.
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\_LAB_\vscode\node_modules\native-keymap
I tried to rebuild the native-keymap project in VS2017 but then I got the similar message for two other node_modules and eventually again from native-keymap.
My PC environment:
Windows 10 and Visual Studio 2017 Community.
Python: 2.7.14
Node: 8.11.1
npm: 5.6.0
yarn: 1.6.0

Related

VS Code yarn install error: Command: node-gyp rebuild, Directory: /vscod/node_modules/native-watchdog

Using yarn install to build VS Code throws "node-gyp rebuild" errors.
Version of VS Code: 1.50.0
Operating System: macOS 10.15.7
Node.JS, x64, version v12.19.0
yarn version 1.22.10
Xcode version Version 12.0.1
Python version 2.7.16
Following Error:
aquilas-iMac:vscod1 amora$ yarn
yarn install v1.22.10
$ node build/npm/preinstall.js
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
info vscode-windows-ca-certs#0.2.0: The platform "darwin" is incompatible with this module.
info "vscode-windows-ca-certs#0.2.0" is an optional dependency and failed compatibility check. Excluding it from installation.
info vscode-windows-registry#1.0.3: The platform "darwin" is incompatible with this module.
info "vscode-windows-registry#1.0.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info windows-foreground-love#0.2.0: The platform "darwin" is incompatible with this module.
info "windows-foreground-love#0.2.0" is an optional dependency and failed compatibility check. Excluding it from installation.
info windows-mutex#0.3.0: The platform "darwin" is incompatible with this module.
info "windows-mutex#0.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
info windows-process-tree#0.2.4: The platform "darwin" is incompatible with this module.
info "windows-process-tree#0.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗 Linking dependencies...
warning " > gulp-tsb#4.0.5" has incorrect peer dependency "typescript#^3.0.0".
[4/4] 🔨 Building fresh packages...
[1/15] ⢀ keytar
[2/15] ⢀ native-is-elevated
[3/15] ⢀ native-keymap
[4/15] ⢀ native-watchdog
error /Users/amora/Documents/GitHub/vscod1/node_modules/native-watchdog: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/amora/Documents/GitHub/vscod1/node_modules/native-watchdog
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp#5.1.0
gyp info using node#12.19.0 | darwin | x64
gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args '/usr/local/lib/node_modules/npm/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 '/Users/amora/Documents/GitHub/vscod1/node_modules/native-watchdog/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/amora/Library/Caches/node-gyp/9.2.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/amora/Library/Caches/node-gyp/9.2.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/amora/Library/Caches/node-gyp/9.2.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/amora/Documents/GitHub/vscod1/node_modules/native-watchdog',
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 args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/watchdog/src/watchdog.o
In file included from ../src/watchdog.cc:9:
/Users/amora/Library/Caches/node-gyp/9.2.1/include/node/uv.h:24:2: error: unterminated conditional directive
#ifndef UV_H
^
In file included from ../src/watchdog.cc:18:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:72:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/unistd.h:132:1: error: cannot combine with previous 'type-name' declaration specifier
struct accessx_descriptor {
^
In file included from ../src/watchdog.cc:9:
/Users/amora/Library/Caches/node-gyp/9.2.1/include/node/uv.h:473:1: warning: declaration does not declare anything [-Wmissing-declarations]
UV_EXTERN uv_buf_t
^~~~~~~~~~~~~~~~~~
/Users/amora/Library/Caches/node-gyp/9.2.1/include/node/uv.h:47:20: note: expanded from macro 'UV_EXTERN'
# define UV_EXTERN __attribute__((visibility("default")))
^
../src/watchdog.cc:82:5: error: use of undeclared identifier 'uv_thread_create'
uv_thread_create(&w_monitor_thread_id, w_monitor, NULL);
^
../src/watchdog.cc:121:41: error: expected '}'
NAPI_MODULE(NODE_GYP_MODULE_NAME, Init);
^
/Users/amora/Library/Caches/node-gyp/9.2.1/include/node/uv.h:27:12: note: to match this '{'
extern "C" {
^
1 warning and 4 errors generated.
make: *** [Release/obj.target/watchdog/src/watchdog.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/amora/Documents/GitHub/vscod1/node_modules/native-watchdog
I was working on this issue for hours. Node-gyp is really a Pain !
Solution:
In case of issues, try deleting the contents of ~/.node-gyp (alternatively ~/.cache/node-gyp for Linux or ~/Library/Caches/node-gyp/ for macOS) first and then run yarn cache clean and then try again.
But another error comes:
...
...
...
warning Error running install script for optional dependency: "/Users/amora/Documents/GitHub/vscode1/extensions/markdown-language-features/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/amora/Documents/GitHub/vscode1/extensions/markdown-language-features/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp#0.6.39
node-pre-gyp info using node#12.19.0 | darwin | x64
node-pre-gyp info check checked for \"/Users/amora/Documents/GitHub/vscode1/extensions/markdown-language-features/node_modules/fsevents/lib/binding/Release/electron-v9.2-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-electron-v9.2-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-electron-v9.2-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-electron-v9.2-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.1.3 and electron#9.2.1 (electron-v9.2 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-electron-v9.2-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-electron-v9.2-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.1.3 and electron#9.2.1 (electron-v9.2 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http Connection closed while downloading tarball file
...
...
...
Tried many many times, including checking the network.
Cannot download fse-v1.1.3-electron-v9.2-darwin-x64.tar.gz

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

cannot read property 'access_token" of undefined

I'm using Auth0 and trying to get AccessToken. But I faced to difficult problem.
how can I solve this problem?
I've got an error like this:
E:\sample projects\Building-API\movieanalyst-website\server.js:27
if(req.body.access_token){
^
TypeError: Cannot read property 'access_token' of undefined
at E:\sample projects\Building-API\movieanalyst-website\server.js:27:18
at Request.callback (E:\sample projects\Building-API\movieanalyst-website\node_modules\superagent\lib\node\index.js:688:3)
at E:\sample projects\Building-API\movieanalyst-website\node_modules\superagent\lib\node\index.js:883:18
at IncomingMessage.<anonymous> (E:\sample projects\Building-API\movieanalyst-website\node_modules\superagent\lib\node\parsers\json.js:16:7)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! movieanalyst-website#1.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the movieanalyst-website#1.0.0 start script 'node server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the movieanalyst-website package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs movieanalyst-website
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls movieanalyst-website
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Assassin\AppData\Roaming\npm-cache\_logs\2017-07-24T11_28_24_478Z-debug.log
According to the error, code is this
function getAccessToken(req, res, next) {
request
.post('https://shinji-sakai.auth0.com/oauth/token')
.send(authData)
.end(function(err, res) {
if(req.body.access_token){
req.access_token = res.body.access_token;
next();
} else {
res.send(401, 'Unauthorized');
}
})
}
plz, give me the way to solve this problem.
Thanks :)
It seems that the body property from your req request is undefined. You should check you request to see if you are sending the correct data. Maybe you can use postman or another RESTful API to test.
Also you can change your code to check the body property first, like this (but I think that your problem is with the actual request):
function getAccessToken(req, res, next) {
request
.post('https://shinji-sakai.auth0.com/oauth/token')
.send(authData)
.end(function(err, res) {
if(req.body && req.body.access_token) {
req.access_token = res.body.access_token;
next();
} else {
res.send(401, 'Unauthorized');
}
})
}

sudo mup deploy error

This was the last step to deploy my meteor app onto Digital Ocean using compose.io as a database, and I'm trying to figure out how to read this error. This happened after I installed an unofficial homebrew package on https://gist.github.com/arunoda/7790979 in order to run "sudo mup setup."
MacBook-Air:cb user$ sudo mup deploy
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
Building Started: .
Started TaskList: Deploy app 'testSite' (linux)
[104.236.29.161] - Uploading bundle
[104.236.29.161] ✔ Uploading bundle: SUCCESS
[104.236.29.161] - Setting up Environment Variables
[104.236.29.161] ✔ Setting up Environment Variables: SUCCESS
[104.236.29.161] - Invoking deployment process
[104.236.29.161] ✘ Invoking deployment process: FAILED
-----------------------------------STDERR-----------------------------------
/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.node-gyp/0.10.33/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/0.10.33',
gyp info spawn args '-Dmodule_root_dir=/opt/testSite/tmp/bundle/programs/server/npm/sacha:juice/node_modules/juice/node_modules/jsdom/node_modules/contextify',
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' ]
gyp info ok
npm WARN package.json meteor-dev-bundle#0.0.0 No description
npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle#0.0.0 No README data
/opt/testSite/config/env.sh: line 10: linda: No such file or directory
-----------------------------------STDOUT-----------------------------------
xtify/src/contextify.o
SOLINK_MODULE(target) Release/obj.target/contextify.node
SOLINK_MODULE(target) Release/obj.target/contextify.node: Finished
COPY Release/contextify.node
make: Leaving directory `/opt/testSite/tmp/bundle/programs/server/npm/sacha:juice/node_modules/juice/node_modules/jsdom/node_modules/contextify/build'
> fibers#1.0.1 install /opt/testSite/tmp/bundle/programs/server/node_modules/fibers
> node ./build.js
`linux-x64-v8-3.14` exists; testing
Binary is fine; exiting
underscore#1.5.2 node_modules/underscore
eachline#2.3.3 node_modules/eachline
└── type-of#2.0.1
semver#4.1.0 node_modules/semver
chalk#0.5.1 node_modules/chalk
├── escape-string-regexp#1.0.2
├── ansi-styles#1.1.0
├── supports-color#0.2.0
├── strip-ansi#0.3.0 (ansi-regex#0.2.1)
└── has-ansi#0.1.0 (ansi-regex#0.2.1)
fibers#1.0.1 node_modules/fibers
source-map-support#0.2.8 node_modules/source-map-support
└── source-map#0.1.32 (amdefine#0.1.0)
Waiting for MongoDB to initialize. (5 minutes)
----------------------------------------------------------------------------
Completed TaskList: Deploy app 'testSite' (linux)