some background for [my stackoverflow question on enoent err](http://stackoverflow.com/q/21964874/3290121) | |
below are all the essential commands that I ran on a brand new Ubuntu Server 12.04.3, so you can see exactly what led up to the ENOENT ERR, and where I have installed various packages. | |
# | |
echo prefix = ~/local >> ~/.npmrc | |
mkdir local | |
curl -O https://www.npmjs.org/install.sh | |
sudo sh install.sh | |
npm cannot be installed without nodejs. | |
Install node first, and then try again. | |
Maybe node is installed, but not in the PATH? | |
Note that running as sudo can change envs. | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
Node.js configure error: No acceptable C compiler found! | |
Please make sure you have a C compiler installed on your system and/or | |
consider adjusting the CC environment variable if you installed | |
it in a non-standard prefix. | |
# | |
sudo apt-get install build-essential checkinstall | |
wing extra packages will be installed: | |
binutils cpp cpp-4.6 dpkg-dev fakeroot g++ g++-4.6 gcc gcc-4.6 | |
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl | |
libc-dev-bin libc6-dev libdpkg-perl libgomp1 libmpc2 libmpfr4 | |
libquadmath0 libstdc++6-4.6-dev linux-libc-dev make manpages-dev | |
Suggested packages: | |
binutils-doc gettext cpp-doc gcc-4.6-locales debian-keyring g++-multilib | |
g++-4.6-multilib gcc-4.6-doc libstdc++6-4.6-dbg gcc-multilib autoconf | |
automake1.9 libtool flex bison gdb gcc-doc gcc-4.6-multilib | |
libmudflap0-4.6-dev libgcc1-dbg libgomp1-dbg libquadmath0-dbg | |
libmudflap0-dbg binutils-gold glibc-doc libstdc++6-4.6-doc make-doc | |
The following NEW packages will be installed: | |
binutils build-essential checkinstall cpp cpp-4.6 dpkg-dev fakeroot g++ | |
g++-4.6 gcc gcc-4.6 libalgorithm-diff-perl libalgorithm-diff-xs-perl | |
libalgorithm-merge-perl libc-dev-bin libc6-dev libdpkg-perl libgomp1 | |
libmpc2 libmpfr4 libquadmath0 libstdc++6-4.6-dev linux-libc-dev make | |
manpages-dev | |
0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded. | |
Need to get 30.7 MB of archives. | |
After this operation, 84.4 MB of additional disk space will be used. | |
sudo apt-get update | |
sudo apt-get install build-essential checkinstall | |
# | |
./configure --prefix=~/local | |
{ 'target_defaults': { 'cflags': [], | |
'default_configuration': 'Release', | |
'defines': [], | |
'include_dirs': [], | |
'libraries': []}, | |
'variables': { 'clang': 0, | |
'gcc_version': 46, | |
'host_arch': 'x64', | |
'node_install_npm': 'true', | |
'node_prefix': '/home/ubuntu/local', | |
'node_shared_cares': 'false', | |
'node_shared_http_parser': 'false', | |
'node_shared_libuv': 'false', | |
'node_shared_openssl': 'false', | |
'node_shared_v8': 'false', | |
'node_shared_zlib': 'false', | |
'node_tag': '', | |
'node_unsafe_optimizations': 0, | |
'node_use_dtrace': 'false', | |
'node_use_etw': 'false', | |
'node_use_openssl': 'true', | |
'node_use_perfctr': 'false', | |
'node_use_systemtap': 'false', | |
'python': '/usr/bin/python', | |
'target_arch': 'x64', | |
'v8_enable_gdbjit': 0, | |
'v8_no_strict_aliasing': 1, | |
'v8_use_snapshot': 'true'}} | |
creating ./config.gypi | |
creating ./config.mk | |
make install | |
installing /home/ubuntu/local/lib/node_modules/npm/* | |
symlinking ../lib/node_modules/npm/bin/npm-cli.js -> /home/ubuntu/local/bin/npm | |
updating shebang of /home/ubuntu/local/bin/npm to /home/ubuntu/local/bin/node | |
installing /home/ubuntu/local/include/node/ | |
At this point `node` is still not found | |
echo "export NODE_PATH=$NODE_PATH:/home/ubuntu/local/lib/node_modules" >> ~/.bashrc && source ~/.bashrc | |
`node` stil not found | |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc && . ~/.bashrc | |
Finally it's found :D | |
# | |
sudo sh install.sh | |
$ sudo sh install.sh | |
npm cannot be installed without nodejs. | |
Install node first, and then try again. | |
Maybe node is installed, but not in the PATH? | |
Note that running as sudo can change envs. | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
$ echo $PATH | |
/home/ubuntu/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games | |
$ node --version | |
v0.10.26 | |
# Actually node also installed npm :) so I don't have to run this install.sh | |
$ npm -v | |
1.4.3 | |
######################################## | |
yeoman.io | |
# | |
npm install -g yo | |
/home/ubuntu/local/bin/bower -> /home/ubuntu/local/lib/node_modules/bower/bin/bower | |
grunt-cli@0.1.13 /home/ubuntu/local/lib/node_modules/grunt-cli | |
├── resolve@0.3.1 | |
├── nopt@1.0.10 (abbrev@1.0.4) | |
└── findup-sync@0.1.2 (lodash@1.0.1, glob@3.1.21) | |
bower@1.2.8 /home/ubuntu/local/lib/node_modules/bower | |
├── junk@0.2.2 | |
├── stringify-object@0.1.8 | |
├── abbrev@1.0.4 | |
├── which@1.0.5 | |
├── chmodr@0.1.0 | |
├── osenv@0.0.3 | |
├── archy@0.0.2 | |
├── graceful-fs@2.0.2 | |
├── rimraf@2.2.6 | |
├── open@0.0.4 | |
├── p-throttler@0.0.1 | |
├── bower-logger@0.2.2 | |
├── bower-endpoint-parser@0.2.1 | |
├── lru-cache@2.3.1 | |
├── nopt@2.1.2 | |
├── retry@0.6.0 | |
├── chalk@0.2.1 (has-color@0.1.4, ansi-styles@0.2.0) | |
├── mkdirp@0.3.5 | |
├── tmp@0.0.23 | |
├── q@0.9.7 | |
├── semver@2.1.0 | |
├── fstream@0.1.25 (inherits@2.0.1) | |
├── fstream-ignore@0.0.7 (inherits@2.0.1, minimatch@0.2.14) | |
├── request-progress@0.3.1 (throttleit@0.0.2) | |
├── sudo-block@0.2.1 (chalk@0.1.1) | |
├── bower-json@0.4.0 (deep-extend@0.2.8, intersect@0.0.3) | |
├── glob@3.2.8 (inherits@2.0.1, minimatch@0.2.14) | |
├── tar@0.1.19 (inherits@2.0.1, block-stream@0.0.7) | |
├── promptly@0.2.0 (read@1.0.5) | |
├── request@2.27.0 (json-stringify-safe@5.0.0, aws-sign@0.3.0, forever-agent@0.5.2, qs@0.6.6, tunnel-agent@0.3.0, oauth-sign@0.3.0, cookie-jar@0.3.0, node-uuid@1.4.1, mime@1.2.11, form-data@0.1.2, http-signature@0.10.0, hawk@1.0.0) | |
├── update-notifier@0.1.7 (configstore@0.1.7) | |
├── decompress-zip@0.0.4 (mkpath@0.1.0, touch@0.0.2, readable-stream@1.1.11, binary@0.3.0) | |
├── mout@0.7.1 | |
├── cardinal@0.4.4 (ansicolors@0.2.1, redeyed@0.4.2) | |
├── bower-config@0.5.0 (optimist@0.6.1, mout@0.6.0) | |
├── inquirer@0.3.5 (mute-stream@0.0.3, async@0.2.10, lodash@1.2.1, cli-color@0.2.3) | |
├── bower-registry-client@0.1.6 (request-replay@0.2.0, async@0.2.10, bower-config@0.4.5) | |
└── handlebars@1.0.12 (optimist@0.3.7, uglify-js@2.3.6) | |
yo@1.1.2 /home/ubuntu/local/lib/node_modules/yo | |
├── open@0.0.4 | |
├── async@0.2.10 | |
├── shelljs@0.2.6 | |
├── chalk@0.4.0 (has-color@0.1.4, ansi-styles@1.0.0, strip-ansi@0.1.1) | |
├── nopt@2.1.2 (abbrev@1.0.4) | |
├── sudo-block@0.3.0 (chalk@0.3.0) | |
├── findup@0.1.3 (colors@0.6.2, nopt@1.0.10) | |
├── lodash@2.4.1 | |
├── update-notifier@0.1.7 (chalk@0.2.1, semver@2.1.0, request@2.27.0, configstore@0.1.7) | |
├── insight@0.3.1 (object-assign@0.1.2, lodash.debounce@2.4.1, request@2.27.0, inquirer@0.4.0, configstore@0.2.2) | |
└── yeoman-generator@0.16.0 (dargs@0.1.0, diff@1.0.8, debug@0.7.4, class-extend@0.1.1, rimraf@2.2.6, text-table@0.2.0, mime@1.2.11, mkdirp@0.3.5, isbinaryfile@2.0.1, underscore.string@2.3.3, iconv-lite@0.2.11, glob@3.2.8, request@2.30.0, findup-sync@0.1.2, cheerio@0.13.1, file-utils@0.1.5, inquirer@0.4.0, download@0.1.10) | |
# | |
$ yo -v | |
1.1.2 | |
yay it's here! | |
# | |
npm install -g generator-angular | |
generator-karma@0.6.0 /home/ubuntu/local/lib/node_modules/generator-karma | |
└── yeoman-generator@0.13.4 (dargs@0.1.0, diff@1.0.8, debug@0.7.4, rimraf@2.2.6, text-table@0.1.1, mime@1.2.11, async@0.2.10, mkdirp@0.3.5, chalk@0.2.1, isbinaryfile@0.1.9, glob@3.2.8, shelljs@0.1.4, tar@0.1.19, findup-sync@0.1.2, underscore.string@2.3.3, iconv-lite@0.2.11, cheerio@0.12.4, request@2.25.0, lodash@1.3.1, inquirer@0.3.5) | |
generator-angular@0.7.1 /home/ubuntu/local/lib/node_modules/generator-angular | |
├── chalk@0.3.0 (has-color@0.1.4, ansi-styles@0.2.0) | |
├── wiredep@0.4.2 (chalk@0.1.1, lodash@1.3.1) | |
└── yeoman-generator@0.13.4 (dargs@0.1.0, diff@1.0.8, debug@0.7.4, rimraf@2.2.6, chalk@0.2.1, text-table@0.1.1, mime@1.2.11, async@0.2.10, mkdirp@0.3.5, isbinaryfile@0.1.9, shelljs@0.1.4, glob@3.2.8, tar@0.1.19, underscore.string@2.3.3, findup-sync@0.1.2, iconv-lite@0.2.11, request@2.25.0, inquirer@0.3.5, lodash@1.3.1, cheerio@0.12.4) | |
# | |
mkdir app_A | |
cd into it | |
yo angular > >(tee stdout.log) 2> >(tee stderr.log >&2) | |
ENOGIT git is not installed or not in the PATH | |
npm ERR! code ENOENT | |
npm ERR! errno 34 | |
# | |
sudo apt-get install git | |
into /usr/bin/git | |
# | |
app_b | |
npm cache clear | |
npm cache clean | |
yo angular > >(tee stdout.log) 2> >(tee stderr.log >&2) | |
same ENOENT error, both apps have .gitignore!! :O | |
# | |
mkdir app_c | |
cd app_C | |
touch .npmignore | |
npm cache clear | |
npm cache clean | |
yo angular > >(tee stdout.log) 2> >(tee stderr.log >&2) | |
found in the stderr.log: | |
npm ERR! Error: ENOENT, lstat '/home/ubuntu/app_c/node_modules/grunt/ internal-tasks/bump.js' | |
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 3.2.0-54-virtual | |
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/ npm" "install" | |
npm ERR! cwd /home/ubuntu/app_c | |
npm ERR! node -v v0.10.26 | |
npm ERR! npm -v 1.4.3 | |
npm ERR! path /home/ubuntu/app_c/node_modules/grunt/internal-tasks/bump. js | |
npm ERR! fstream_path /home/ubuntu/app_c/node_modules/grunt/internal- tasks/bump.js | |
npm ERR! fstream_type File | |
npm ERR! fstream_class FileWriter | |
npm ERR! code ENOENT | |
npm ERR! errno 34 | |
npm ERR! fstream_stack /home/ubuntu/local/lib/node_modules/npm/ node_modules/fstream/lib/writer.js:284:26 | |
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment