Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error #2992

Closed
bubifengyun opened this issue Feb 13, 2016 · 14 comments
Closed

build error #2992

bubifengyun opened this issue Feb 13, 2016 · 14 comments
Assignees
Labels
linux Issues with VS Code on Linux

Comments

@bubifengyun
Copy link

I do following https://github.com/Microsoft/vscode/wiki/How-to-Contribute.
But there are so many errors.

first time, i try use sudo npm ..., errors fly in the screen. then I google and i can run npm without sudo. but errors fly in the screen, too.

second time, I delete the vscode folder, softlink nodejs to node, and git clone again, do following the documents. but the same error was poped.

Any suggestions? Thank you.

litianci@litianci-pc:/media/litianci/software/linux$ cd vscode && npm install -g mocha gulp
/home/litianci/.npm-packages/bin/mocha -> /home/litianci/.npm-packages/lib/node_modules/mocha/bin/mocha
/home/litianci/.npm-packages/bin/_mocha -> /home/litianci/.npm-packages/lib/node_modules/mocha/bin/_mocha
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
/home/litianci/.npm-packages/bin/gulp -> /home/litianci/.npm-packages/lib/node_modules/gulp/bin/gulp.js
mocha@2.4.5 /home/litianci/.npm-packages/lib/node_modules/mocha
├── commander@2.3.0
├── escape-string-regexp@1.0.2
├── diff@1.4.0
├── growl@1.8.1
├── supports-color@1.2.0
├── debug@2.2.0 (ms@0.7.1)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
└── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)

gulp@3.9.1 /home/litianci/.npm-packages/lib/node_modules/gulp
├── interpret@1.0.0
├── pretty-hrtime@1.0.1
├── deprecated@0.0.1
├── archy@1.0.0
├── minimist@1.2.0
├── semver@4.3.6
├── tildify@1.1.2 (os-homedir@1.0.1)
├── v8flags@2.0.11 (user-home@1.1.1)
├── chalk@1.1.1 (escape-string-regexp@1.0.4, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)
├── orchestrator@0.3.7 (stream-consume@0.1.0, sequencify@0.0.7, end-of-stream@0.1.5)
├── liftoff@2.2.0 (extend@2.0.1, rechoir@0.6.2, flagged-respawn@0.3.1, resolve@1.1.7, findup-sync@0.3.0)
├── vinyl-fs@0.3.14 (graceful-fs@3.0.8, defaults@1.0.3, strip-bom@1.0.0, vinyl@0.4.6, mkdirp@0.5.1, through2@0.6.5, glob-stream@3.1.18, glob-watcher@0.0.6)
└── gulp-util@3.0.7 (array-differ@1.0.0, array-uniq@1.0.2, lodash._reescape@3.0.0, lodash._reevaluate@3.0.0, object-assign@3.0.0, beeper@1.1.0, lodash._reinterpolate@3.0.0, replace-ext@0.0.1, fancy-log@1.2.0, has-gulplog@0.1.0, gulplog@1.0.0, vinyl@0.5.3, lodash.template@3.6.2, through2@2.0.1, multipipe@0.1.2, dateformat@1.0.12)
litianci@litianci-pc:/media/litianci/software/linux/vscode$ ./scripts/npm.sh install --arch=x64./scripts/npm.sh install --arch=x64^C
litianci@litianci-pc:/media/litianci/software/linux/vscode$ ./scripts/npm.sh install --arch=x64

> Code@0.10.9 preinstall /media/litianci/software/linux/vscode
> node build/npm/preinstall.js

npm WARN optional dep failed, continuing windows-mutex@0.2.0

> native-keymap@0.1.2 install /media/litianci/software/linux/vscode/node_modules/native-keymap
> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at exports._errnoException (util.js:870:11)
gyp ERR! stack     at TCP.onread (net.js:544:26)
gyp ERR! System Linux 4.2.0-1-amd64
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /media/litianci/software/linux/vscode/node_modules/native-keymap
gyp ERR! node -v v4.2.4
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! native-keymap@0.1.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the native-keymap@0.1.2 install script.
npm ERR! This is most likely a problem with the native-keymap package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls native-keymap
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.2.0-1-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--arch=x64"
npm ERR! cwd /media/litianci/software/linux/vscode
npm ERR! node -v v4.2.4
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN optional dep failed, continuing fsevents@0.3.8
npm WARN engine prettyjson@0.8.1: wanted: {"node":">= 0.6.0 < 0.11.0"} (current: {"node":"4.2.4","npm":"1.4.21"})

> typechecker@2.0.8 preinstall /media/litianci/software/linux/vscode/node_modules/getmac/node_modules/extract-opts/node_modules/typechecker
> node ./cyclic.js

npm ERR! fetch failed https://registry.npmjs.org/normalize-url/-/normalize-url-1.4.0.tgz
npm WARN deprecated lodash@2.4.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm ERR! error rolling back Error: ENOTEMPTY: directory not empty, rmdir '/media/litianci/software/linux/vscode/node_modules/gulp-cssnano/node_modules/cssnano/node_modules/postcss/d.ts'
npm ERR! error rolling back     at Error (native)
npm ERR! error rolling back  cssnano@3.5.2 { [Error: ENOTEMPTY: directory not empty, rmdir '/media/litianci/software/linux/vscode/node_modules/gulp-cssnano/node_modules/cssnano/node_modules/postcss/d.ts']
npm ERR! error rolling back   errno: -39,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   syscall: 'rmdir',
npm ERR! error rolling back   path: '/media/litianci/software/linux/vscode/node_modules/gulp-cssnano/node_modules/cssnano/node_modules/postcss/d.ts' }
npm ERR! Error: ENOENT: no such file or directory, open '/media/litianci/software/linux/vscode/node_modules/gulp-cssnano/node_modules/cssnano/node_modules/autoprefixer/lib/prefixer.js'
npm ERR!     at Error (native)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.2.0-1-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--arch=x64"
npm ERR! cwd /media/litianci/software/linux/vscode
npm ERR! node -v v4.2.4
npm ERR! npm -v 1.4.21
npm ERR! path /media/litianci/software/linux/vscode/node_modules/gulp-cssnano/node_modules/cssnano/node_modules/autoprefixer/lib/prefixer.js
npm ERR! syscall open
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! tar.unpack untar error /home/litianci/.electron-gyp/.npm/postcss/5.0.15/package.tgz
npm ERR! tar.unpack untar error /home/litianci/.electron-gyp/.npm/colormin/1.0.7/package.tgz
npm ERR! tar.unpack untar error /home/litianci/.electron-gyp/.npm/postcss-merge-longhand/2.0.1/package.tgz
npm ERR! tar.unpack untar error /home/litianci/.electron-gyp/.npm/uniqs/2.0.0/package.tgz
npm ERR! tar.unpack untar error /home/litianci/.electron-gyp/.npm/alphanum-sort/1.0.2/package.tgz
npm ERR! error rolling back Error: ENOTEMPTY: directory not empty, rmdir '/media/litianci/software/linux/vscode/node_modules/gulp-cssnano/node_modules/cssnano/node_modules/postcss-calc/node_modules/postcss-message-helpers'
npm ERR! error rolling back     at Error (native)
npm ERR! error rolling back  gulp-cssnano@2.1.1 { [Error: ENOTEMPTY: directory not empty, rmdir '/media/litianci/software/linux/vscode/node_modules/gulp-cssnano/node_modules/cssnano/node_modules/postcss-calc/node_modules/postcss-message-helpers']
npm ERR! error rolling back   errno: -39,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   syscall: 'rmdir',
npm ERR! error rolling back   path: '/media/litianci/software/linux/vscode/node_modules/gulp-cssnano/node_modules/cssnano/node_modules/postcss-calc/node_modules/postcss-message-helpers' }
npm ERR! tar.unpack untar error /home/litianci/.electron-gyp/.npm/postcss-selector-parser/1.3.1/package.tgz
npm ERR! Error: ENOENT: no such file or directory, open '/media/litianci/software/linux/vscode/node_modules/gulp-cssnano/node_modules/cssnano/node_modules/postcss-calc/node_modules/reduce-css-calc/LICENSE'
npm ERR!     at Error (native)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.2.0-1-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--arch=x64"
npm ERR! cwd /media/litianci/software/linux/vscode
npm ERR! node -v v4.2.4
npm ERR! npm -v 1.4.21
npm ERR! path /media/litianci/software/linux/vscode/node_modules/gulp-cssnano/node_modules/cssnano/node_modules/postcss-calc/node_modules/reduce-css-calc/LICENSE
npm ERR! syscall open
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! tar.unpack untar error /home/litianci/.electron-gyp/.npm/uniqid/1.0.0/package.tgz
npm ERR! tar.unpack untar error /home/litianci/.electron-gyp/.npm/alphanum-sort/1.0.2/package.tgz
npm WARN deprecated lodash@0.9.2: Grunt needs your help! See https://github.com/gruntjs/grunt/issues/1403.

> ghooks@1.0.3 install /media/litianci/software/linux/vscode/node_modules/ghooks
> node ./bin/install

npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.

> weak@1.0.1 install /media/litianci/software/linux/vscode/node_modules/weak
> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at exports._errnoException (util.js:870:11)
gyp ERR! stack     at TCP.onread (net.js:544:26)
gyp ERR! System Linux 4.2.0-1-amd64
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /media/litianci/software/linux/vscode/node_modules/weak
gyp ERR! node -v v4.2.4
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian


> oniguruma@6.0.1 install /media/litianci/software/linux/vscode/node_modules/vscode-textmate/node_modules/oniguruma
> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at exports._errnoException (util.js:870:11)
gyp ERR! stack     at TCP.onread (net.js:544:26)
gyp ERR! System Linux 4.2.0-1-amd64
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /media/litianci/software/linux/vscode/node_modules/vscode-textmate/node_modules/oniguruma
gyp ERR! node -v v4.2.4
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /media/litianci/software/linux/vscode/npm-debug.log
npm ERR! not ok code 0

@bgse
Copy link
Contributor

bgse commented Feb 13, 2016

I've had trouble when following the official guide as well.

Didn't really have the patience to fully investigate, in my case upgrading nodejs from 0.12 to 4.3 did resolve the problem, even though the guide says 0.12 is sufficient.

YMMV though.

@bubifengyun
Copy link
Author

my node installed by sudo apt-get﹉, version 4.2.4.
I will upgrade it to 4.3, thanks for your suggestion.

@bubifengyun
Copy link
Author

@bgse thank you very much. i spend half day to install nodejs version4.3, but I cannot install npm successfully because of dependency. My OS is Deepin 2015 which based on debian sid. So, nothing i can do, except waiting, waiting for deepin upgrade their software.

@Tyriar
Copy link
Member

Tyriar commented Feb 15, 2016

@bubifengyun The error to do with native-keymap is likely because you need to install libx11-dev, make sure you follow the prerequisites section for Linux:

sudo apt-get install libx11-dev

@bubifengyun
Copy link
Author

@Tyriar Yes i have installed it. I have done the prerequisites before install

libx11-dev is already the newest version (2:1.6.3-1).

@Tyriar Tyriar added the linux Issues with VS Code on Linux label Feb 15, 2016
@Tyriar
Copy link
Member

Tyriar commented Feb 15, 2016

@bubifengyun maybe Deepin is missing some package required to build then. I've only tried building on vanilla Debian 8.3.0 and Ubuntu 15.10. Do you have g++ installed? I needed that to build on Debian.

@bubifengyun
Copy link
Author

@Tyriar Yes, i have installed g++. I try to upgrade nodejs to 4.3. Hope it will be OK. Thank you.

@bubifengyun
Copy link
Author

Sorry, I give it up. It is too difficult to fix so many npm-dependency. Maybe it's better for me, Newbee, to download the compiled software.

@Tyriar
Copy link
Member

Tyriar commented Feb 16, 2016

One more thing you could try is try installing it in ~ instead of /media/litianci, maybe file permissions are causing some issues since I see a bunch of read and file don't exist errors. Also I'm not sure if it's a problem for vscode but I've had issues in the past with file permissions on where npm installs its packages, I install mine in ~/.npm-packages (there a tutorial how to do this here).

Anyway good luck, thanks for trying it out!

@bubifengyun
Copy link
Author

npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls native-keymap
npm ERR! There is likely additional logging output above.

when in ~. it pops the same error. I see above messages. does it the reason? node-gyp rebuild

here is my node-gyp rebuild error message.

litianci@litianci-pc:~/vscode$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.0.3
gyp info using node@4.2.4 | linux | x64
gyp info spawn python2
gyp info spawn args [ '/usr/share/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/litianci/vscode/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/share/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/include/nodejs/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/usr/include/nodejs',
gyp info spawn args   '-Dnode_gyp_dir=/usr/share/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/litianci/vscode',
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: binding.gyp not found (cwd: /home/litianci/vscode) while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.2.0-1-amd64
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/litianci/vscode
gyp ERR! node -v v4.2.4
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

it says

binding.gyp not found (cwd: /home/litianci/vscode) while trying to load binding.gyp

I search in my vscode

find ./ -name binding.gyp

nothing shown.

@bubifengyun bubifengyun reopened this Feb 16, 2016
@Tyriar
Copy link
Member

Tyriar commented Feb 16, 2016

@bubifengyun it looks to me like a problem with node, you say you installed it using apt-get initially and then tried to upgrade to 4.3?

i spend half day to install nodejs version4.3, but I cannot install npm successfully because of dependency.

I don't think nodejs provides an official repository to update via apt-get so it could very well be an issue with how node was being installed. Also did you work out the npm issues because that is essential?

I recommend a simple install of node; download 4.3.0, extract to ~/nodejs (or similar) and then adding ~/nodejs/bin to your $PATH:

Make sure you remove the previous version of node however it was installed:

sudo apt-get remove nodejs

Here is how you add to the $PATH:

export PATH=$PATH:/home/litianci/nodejs/bin

You will need to add the above to your .bashrc in order for it to carry over to other terminal sessions.

@Tyriar
Copy link
Member

Tyriar commented Mar 23, 2016

I'm going to close this off as it has been a while. If you're still having issues try removing the vscode directory and cloning/setting it up again.

@Tyriar Tyriar closed this as completed Mar 23, 2016
@bubifengyun
Copy link
Author

thank you. i find that even though the nodejs to 4.3, it pops the same error. I don't know nodejs at all. Maybe I need to learn something about nodejs and back.

@Tyriar
Copy link
Member

Tyriar commented Mar 24, 2016

One other tip, you could try installing nodejs from a package, I only just noticed they had them https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linux Issues with VS Code on Linux
Projects
None yet
Development

No branches or pull requests

3 participants