3

Ubuntu doesn't seem to have whatever N1 is looking for when compiling from source. Here's the output I get when running the initial scripts:

N1-master$ script/grunt
/usr/bin/env: ‘node’: No such file or directory

Has anyone successfully compiled from master and could they provide a guide?

Edit: running the scripts/bootstrap command gives the following error even following the guide linked by edwinksl:

$ script/bootstrap 
Node: v4.2.6
npm: v3.5.2

---> Installing N1 build tools
     This goes inside the `build` folder and runs `npm install`
     It will use the system `npm` to bootstrap our own N1 npm.
     Our build tools (like Grunt) need to be compiled against Node via `npm`.
     Everything else needs to be compiled against Chromium with `apm`.

     $ npm --userconfig="/home/jarlath/Downloads/N1-master/.npmrc" install --loglevel error --cwd="/home/jarlath/Downloads/N1-master/build" --ignoreStdout=true 

npm ERR! Linux 4.4.0-24-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "--userconfig=/home/jarlath/Downloads/N1-master/.npmrc" "install" "--loglevel" "error"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! path /home/jarlath/.npm/registry.npmjs.org/grunt-contrib-less/.cache.json.4179490079
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall lstat

npm ERR! enoent ENOENT: no such file or directory, lstat '/home/jarlath/.npm/registry.npmjs.org/grunt-contrib-less/.cache.json.4179490079'
npm ERR! enoent ENOENT: no such file or directory, lstat '/home/jarlath/.npm/registry.npmjs.org/grunt-contrib-less/.cache.json.4179490079'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/jarlath/Downloads/N1-master/build/npm-debug.log
4

Assuming you've installed nodejs (sudo apt-get install nodejs), the problem is the same as reported here — Ubuntu and Debian now install node at /usr/bin/nodejs rather than /usr/bin/node.

The two solutions least likely to break your system (in the long-run), are either:

  1. Install nodejs-legacy (sudo apt-get install nodejs-legacy), which provides a symlink from node to nodejs. (source)
  2. Use update-alternatives to provide the symlink (source):

    sudo update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100
    
  • That takes things a step further, thank you. But the guide linked to by edwinksl doesn't seem to be using Ubuntu as a reference build environment. I'll update the question with the subsequent error. – TenLeftFingers Jun 24 '16 at 22:23
  • 1
    After following your answer, I additionally added a PPA for the official latest node as well as npm ( stackoverflow.com/a/6237400/1007385). Then sudo apt-get install libgnome-keyring-dev sudo npm config set python /usr/bin/python2 -g And follow the install instructions again. – TenLeftFingers Jun 28 '16 at 15:00
  • This is the correct answer to the original question – nod Aug 19 '16 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.