Code Monkey home page Code Monkey logo

n's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

n's Issues

0.6.18-RC's are listed

It seems that the RC's are now listed in the node.js code repo, however they seem to have started using a format with RC added to the end: node-v0.6.18-RC1.tar.gz
found here: http://nodejs.org/dist/v0.6.18/

This causes the following error:

######################################################################## 100.0%
rm: node-v0.6.18.tar.gz: No such file or directory
Error: installation failed
  node version 0.6.18 does not exist,
  n failed to fetch the tarball,
  or tar failed. Try a different
  version or view /tmp/n.log to view
  error details.

Option to install HEAD

I think it would be great to be able to install or update the HEAD version directly off GitHub.

ImportError: No module named Scripting

I've installed 0.6.6 with n and I'm getting this error when trying to build node-serialport. Any ideas?

Traceback (most recent call last):
File "/opt/local/bin/node-waf", line 14, in
import Scripting
ImportError: No module named Scripting

node 0.6.6
npm 1.1.0-beta-4

Thanks!

Unable to install node versions newer than 0.5.0

Getting the following error when attempting to n versions newer than 0.5.0:

Matt-Walterss-MacBook-Pro:n matt$ n 0.5.3
######################################################################## 100.0%
Error: installation failed
node version 0.5.3 does not exist,
n failed to fetch the tarball,
or tar failed. Try a different
version or view /tmp/n.log to view
error details.
Matt-Walterss-MacBook-Pro:n matt$ cat /tmp/n.log 
tar: Unrecognized archive format: Inappropriate file type or format
tar: Error exit delayed from previous errors.

Thanks,

Matt

npm shortcut

Hey guys,

The below sh snippet will make npm always work, and always be the current version. I'd like to add this to the readme, but wasn't sure what section / etc would be preferable. I'm putting this here both as a reference, and for us to discuss. I'll submit a pull request if @visionmedia can let me know where to put it, or if he'd like to put it in there, etc.

function npm() {
    active=$(node --version);
    active=${active#v};
    n npm $active $@
}

cd: 297: can't cd to node-0.4.9

Anytime you install a new version of node, a cd fires prior to the wget/tar step. This causes the compile step to wait forever.

Workaround: run install again after it successfully downloads the file

npm -g installs within /usr/local/n, but isn't in the PATH

I installed n with make install. I then installed node 0.6.8 and now I've installed forever using npm install forever -g.

The problem is that npm installed forever in /usr/local/n/versions/0.6.8/bin, but by default my PATH isn't extended to include this dir.

Doesn't it make sense to have a "current" symlinked folder in /usr/local/n, then include /usr/local/n/current/bin folder in your PATH so that files in the /usr/local/n/current/bin are executable globally?

n permissions errors

I've installed n and various nodes, but now I'm getting the following errors whenever I attempt to install a new node:

xerxes:$ n latest
/usr/local/bin/node
cp: cannot remove ./wafadmin/Options.py': Permission denied cp: cannot remove./wafadmin/Scripting.py': Permission denied
cp: cannot remove ./wafadmin/Runner.py': Permission denied cp: cannot remove./wafadmin/TaskGen.py': Permission denied
cp: cannot remove ./wafadmin/Task.py': Permission denied cp: cannot remove./wafadmin/py3kfixes.py': Permission denied
cp: cannot remove ./wafadmin/__init__.py': Permission denied cp: cannot remove./wafadmin/Constants.py': Permission denied
cp: cannot remove ./wafadmin/pproc.py': Permission denied cp: cannot remove./wafadmin/Utils.py': Permission denied
cp: cannot remove ./wafadmin/Environment.py': Permission denied cp: cannot remove./wafadmin/Tools/unittestw.py': Permission denied
cp: cannot remove ./wafadmin/Tools/python.py': Permission denied cp: cannot remove./wafadmin/Tools/winres.py': Permission denied
cp: cannot remove ./wafadmin/Tools/suncxx.py': Permission denied cp: cannot remove./wafadmin/Tools/compiler_d.py': Permission denied
cp: cannot remove ./wafadmin/Tools/gdc.py': Permission denied cp: cannot remove./wafadmin/Tools/xlcxx.py': Permission denied
cp: cannot remove ./wafadmin/Tools/ar.py': Permission denied cp: cannot remove./wafadmin/Tools/compiler_cxx.py': Permission denied
cp: cannot remove ./wafadmin/Tools/cc.py': Permission denied cp: cannot remove./wafadmin/Tools/init.py': Permission denied
cp: cannot remove ./wafadmin/Tools/icc.py': Permission denied cp: cannot remove./wafadmin/Tools/preproc.py': Permission denied
cp: cannot remove ./wafadmin/Tools/ccroot.py': Permission denied cp: cannot remove./wafadmin/Tools/dmd.py': Permission denied
cp: cannot remove ./wafadmin/Tools/libtool.py': Permission denied cp: cannot remove./wafadmin/Tools/gnu_dirs.py': Permission denied
cp: cannot remove ./wafadmin/Tools/osx.py': Permission denied cp: cannot remove./wafadmin/Tools/gas.py': Permission denied
cp: cannot remove ./wafadmin/Tools/xlc.py': Permission denied cp: cannot remove./wafadmin/Tools/intltool.py': Permission denied
cp: cannot remove ./wafadmin/Tools/compiler_cc.py': Permission denied cp: cannot remove./wafadmin/Tools/nasm.py': Permission denied
cp: cannot remove ./wafadmin/Tools/icpc.py': Permission denied cp: cannot remove./wafadmin/Tools/config_c.py': Permission denied
cp: cannot remove ./wafadmin/Tools/gxx.py': Permission denied cp: cannot remove./wafadmin/Tools/cxx.py': Permission denied
cp: cannot remove ./wafadmin/Tools/gcc.py': Permission denied cp: cannot remove./wafadmin/Tools/suncc.py': Permission denied
cp: cannot remove ./wafadmin/Tools/d.py': Permission denied cp: cannot remove./wafadmin/Tools/node_addon.py': Permission denied
cp: cannot remove ./wafadmin/Tools/gob2.py': Permission denied cp: cannot remove./wafadmin/Tools/misc.py': Permission denied
cp: cannot remove ./wafadmin/ansiterm.py': Permission denied cp: cannot remove./wafadmin/Node.py': Permission denied
cp: cannot remove ./wafadmin/Build.py': Permission denied cp: cannot remove./wafadmin/Configure.py': Permission denied
cp: cannot remove ./wafadmin/Logs.py': Permission denied cp: cannot remove./node/wafadmin/Options.py': Permission denied
cp: cannot remove ./node/wafadmin/Scripting.py': Permission denied cp: cannot remove./node/wafadmin/Runner.py': Permission denied
cp: cannot remove ./node/wafadmin/TaskGen.py': Permission denied cp: cannot remove./node/wafadmin/Task.py': Permission denied
cp: cannot remove ./node/wafadmin/py3kfixes.py': Permission denied cp: cannot remove./node/wafadmin/init.py': Permission denied
cp: cannot remove ./node/wafadmin/Constants.py': Permission denied cp: cannot remove./node/wafadmin/pproc.py': Permission denied
cp: cannot remove ./node/wafadmin/Utils.py': Permission denied cp: cannot remove./node/wafadmin/Environment.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/unittestw.py': Permission denied cp: cannot remove./node/wafadmin/Tools/python.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/winres.py': Permission denied cp: cannot remove./node/wafadmin/Tools/suncxx.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/compiler_d.py': Permission denied cp: cannot remove./node/wafadmin/Tools/gdc.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/xlcxx.py': Permission denied cp: cannot remove./node/wafadmin/Tools/ar.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/compiler_cxx.py': Permission denied cp: cannot remove./node/wafadmin/Tools/cc.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/__init__.py': Permission denied cp: cannot remove./node/wafadmin/Tools/icc.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/preproc.py': Permission denied cp: cannot remove./node/wafadmin/Tools/ccroot.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/dmd.py': Permission denied cp: cannot remove./node/wafadmin/Tools/libtool.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/gnu_dirs.py': Permission denied cp: cannot remove./node/wafadmin/Tools/osx.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/gas.py': Permission denied cp: cannot remove./node/wafadmin/Tools/xlc.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/intltool.py': Permission denied cp: cannot remove./node/wafadmin/Tools/compiler_cc.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/nasm.py': Permission denied cp: cannot remove./node/wafadmin/Tools/icpc.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/config_c.py': Permission denied cp: cannot remove./node/wafadmin/Tools/gxx.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/cxx.py': Permission denied cp: cannot remove./node/wafadmin/Tools/gcc.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/suncc.py': Permission denied cp: cannot remove./node/wafadmin/Tools/d.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/node_addon.py': Permission denied cp: cannot remove./node/wafadmin/Tools/gob2.py': Permission denied
cp: cannot remove ./node/wafadmin/Tools/misc.py': Permission denied cp: cannot remove./node/wafadmin/ansiterm.py': Permission denied
cp: cannot remove ./node/wafadmin/Node.py': Permission denied cp: cannot remove./node/wafadmin/Build.py': Permission denied
cp: cannot remove ./node/wafadmin/Configure.py': Permission denied cp: cannot remove./node/wafadmin/Logs.py': Permission denied

xerxes:$ n 0.7.8 node
/usr/local/bin/node
cp: cannot remove ./wafadmin/Options.py': Permission denied cp: cannot remove./wafadmin/Scripting.py': Permission denied
cp: cannot remove ./wafadmin/Runner.py': Permission denied cp: cannot remove./wafadmin/TaskGen.py': Permission denied
cp: cannot remove ./wafadmin/Task.py': Permission denied cp: cannot remove./wafadmin/py3kfixes.py': Permission denied
cp: cannot remove ./wafadmin/__init__.py': Permission denied cp: cannot remove./wafadmin/Constants.py': Permission denied
cp: cannot remove ./wafadmin/pproc.py': Permission denied cp: cannot remove./wafadmin/Utils.py': Permission denied
cp: cannot remove ./wafadmin/Environment.py': Permission denied cp: cannot remove./wafadmin/Tools/unittestw.py': Permission denied
cp: cannot remove ./wafadmin/Tools/python.py': Permission denied cp: cannot remove./wafadmin/Tools/winres.py': Permission denied
cp: cannot remove `./wafadmin/Tools/suncxx.py': Permission denied
... et cetera.

v0.6.19 broken

@visionmedia n is currently broken with v0.6.19. Reason being that the nodejs server has renamed the files as RC.
node-v0.6.19-RC1.tar.gz

root@chaos2:/usr/local/n# n stable
/usr/local/bin/node
######################################################################## 100.0%
rm: cannot remove `node-v0.6.19.tar.gz': No such file or directory
Error: installation failed
  node version 0.6.19 does not exist,
  n failed to fetch the tarball,
  or tar failed. Try a different
  version or view /tmp/n.log to view
  error details.

This breaks n, but I'm inclined to think that this is an issue for nodejs directly since they monkeyed with the names of files in their directory!
see it here:
http://nodejs.org/dist/v0.6.19/

Also, should n stable only grab even versions? :)

Adam

node-waf doesn't seem to be linked up

installing versions don't seem to get node-waf linked up, npm is failing on installing any project that needs that to build. unless i'm missing something.

node-waf issue

sorry TJ to bug you again, but I now get the node-waf command but it still doesn't build, and I'm not sure where the issue would be, it may no longer be with 'n', if I run node-waf I get:

Traceback (most recent call last):
  File "/usr/local/bin/node-waf", line 14, in <module>
    import Scripting
ImportError: No module named Scripting

And if I try to install something from npm, like: npm install base64

I get the following error output:

npm ERR! Error: [email protected] install: `node-waf configure build`
npm ERR! `sh` failed with 1
npm ERR!     at ChildProcess.<anonymous (/usr/local/lib/node/.npm/npm/0.2.15/package/lib/utils/exec.js:25:18)
npm ERR!     at ChildProcess.emit (events:34:17)
npm ERR!     at ChildProcess.onexit (child_process:168:12)
npm ERR!     at node.js:773:9
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the base64 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls base64
npm ERR! There may be additional logging output above.

node v0.5.1 breaks the source code location path

Since 0.5.1 the location of the source is http://nodejs.org/dist/v0.5.1/node-v0.5.1.tar.gz

n exits with this error:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

which is understandable since:

$ cat node-v0.5.1.tar.gz 
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

Oops.

npm ERR! error installing [email protected]

npm http 200 https://registry.npmjs.org/n/-/n-0.7.3.tgz
npm ERR! Could not create /usr/local/lib/node_modules/___n.npm
npm ERR! error installing [email protected]
npm ERR! Error: EACCES, permission denied '/usr/local/lib/node_modules/___n.npm'
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]
npm ERR!
npm ERR! System Darwin 12.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "n"
npm ERR! cwd /Users/merhawie
npm ERR! node -v v0.6.7
npm ERR! npm -v 1.1.0-beta-10
npm ERR! path /usr/local/lib/node_modules/___n.npm
npm ERR! code EACCES
npm ERR! message EACCES, permission denied '/usr/local/lib/node_modules/___n.npm'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/merhawie/npm-debug.log
npm not ok

npm install n

This no longer works, unsure of version. n has to be installed globally via npm install n -g

Colors mis-print on Linux

In version 0.6.0 in the printf statements the control sequence \e needs to revert back to \033 so that it will print colors on Linux.

n and 0.8

I did n stable and got 0.6.18. I canceled the 0.6.18 install and now I can't get rid of it. n rm 0.6.18 silently fails.

Now node -v gives me v0.6.18. I don't know if I had 0.6.18 before. I will install n stable again and hopefully my node will be ok.

0.6.0 installation fails

trying to run:

$ n latest

results in:

######################################################################## 100.0%
Error: installation failed
  node version 0.6.0 does not exist,
  n failed to fetch the tarball,
  or tar failed. Try a different
  version or view /tmp/n.log to view
  error details.

/tmp/n.log just complains that the archive is not an archive (probably 0 bytes)

tar: Unrecognized archive format
tar: Error exit delayed from previous errors.

possibly n is pointing to the wrong place?

Install npm automatically

Could npm be installed automatically when installing a node version?

According to the node.js release information (http://blog.nodejs.org) each version has npm included, but when installing a node.js version using n it's omitted.

Does not work after installing node from package manager in ubuntu

Steps to reproduce:

  1. install node from package manager in ubuntu (see https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager)
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
  1. install npm and n
  2. execute n 0.6.12, everything goes well
  3. execute node --version ==> returns 0.6.11, as installed by package manager

Update: it appears that sudo node --version returns 0.6.12 while node --version returns 0.6.11.

Why does n not also install it locally, so I don't need to run node as root?

'n v0.6.5' does not seem to install npm

The latest 0.6.5 includes the npm package manager. When I install it directly, npm works fine, however when I use 'n' to install 0.6.5, the npm command is not available.

Can't run npm

I did a sudo n 0.6.7 and then can't use the normal npm anymore. Trying sudo n npm 0.6.7 results in

% sudo n npm 0.6.7
/usr/local/bin/n: line 151: test: npm: integer expression expected
######################################################################## 100.0%
Error: installation failed
  node version npm does not exist,
  n failed to fetch the tarball,
  or tar failed. Try a different
  version or view /tmp/n.log to view
  error details.

Error: no Xcode is selected

I haven't installed Xcode on my dev machine, but I installed the Command Line Tools to be able to use Homebrew. Homebrew is working fine, now n is throwing a strange error when trying to configure node:

$ n 0.8.7
######################################################################## 100,0%
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'clang': 1,
                 'host_arch': 'x64',
                 'node_install_npm': 'true',
                 'node_install_waf': 'true',
                 'node_prefix': '/usr/local/n/versions/0.8.7',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_openssl': 'true',
                 'target_arch': 'x64',
                 'v8_no_strict_aliasing': 1,
                 'v8_use_snapshot': 'true'}}
creating  ./config.gypi
creating  ./config.mk
xcode-select: Error: No Xcode is selected. Use xcode-select -switch <path-to-xcode>, or see the xcode-select manpage (man xcode-select) for further information.

Traceback (most recent call last):
  File "tools/gyp_node", line 58, in <module>
    run_gyp(gyp_args)
  File "tools/gyp_node", line 18, in run_gyp
    rc = gyp.main(args)
  File "./tools/gyp/pylib/gyp/__init__.py", line 480, in main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "./tools/gyp/pylib/gyp/generator/make.py", line 2082, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "./tools/gyp/pylib/gyp/generator/make.py", line 764, in Write
    self.Pchify))
  File "./tools/gyp/pylib/gyp/generator/make.py", line 1137, in WriteSources
    cflags = self.xcode_settings.GetCflags(configname)
  File "./tools/gyp/pylib/gyp/xcode_emulation.py", line 259, in GetCflags
    sdk_root = self._SdkPath()
  File "./tools/gyp/pylib/gyp/xcode_emulation.py", line 248, in _SdkPath
    return os.path.join(self._GetSdkBaseDir(), '%s.sdk' % sdk_root)
  File "./tools/gyp/pylib/gyp/xcode_emulation.py", line 234, in _GetSdkBaseDir
    raise Exception('Error %d running xcode-select' % job.returncode)
Exception: Error 2 running xcode-select
make -C out BUILDTYPE=Release V=1
make[1]: Nothing to be done for `all'.
ln -fs out/Release/node node
python tools/install.py install 
installing /usr/local/n/versions/0.8.7/include/node/ares.h
installing /usr/local/n/versions/0.8.7/include/node/ares_version.h
installing /usr/local/n/versions/0.8.7/include/node/uv.h
installing /usr/local/n/versions/0.8.7/include/node/v8-debug.h
installing /usr/local/n/versions/0.8.7/include/node/v8-preparser.h
installing /usr/local/n/versions/0.8.7/include/node/v8-profiler.h
installing /usr/local/n/versions/0.8.7/include/node/v8-testing.h
installing /usr/local/n/versions/0.8.7/include/node/v8.h
installing /usr/local/n/versions/0.8.7/include/node/v8stdint.h
installing /usr/local/n/versions/0.8.7/include/node/eio-emul.h
installing /usr/local/n/versions/0.8.7/include/node/ev-emul.h
installing /usr/local/n/versions/0.8.7/include/node/node.h
installing /usr/local/n/versions/0.8.7/include/node/node_buffer.h
installing /usr/local/n/versions/0.8.7/include/node/node_object_wrap.h
installing /usr/local/n/versions/0.8.7/include/node/node_version.h
installing /usr/local/n/versions/0.8.7/include/node/uv-private/eio.h
installing /usr/local/n/versions/0.8.7/include/node/uv-private/ev.h
installing /usr/local/n/versions/0.8.7/include/node/uv-private/ngx-queue.h
installing /usr/local/n/versions/0.8.7/include/node/uv-private/tree.h
installing /usr/local/n/versions/0.8.7/include/node/uv-private/uv-unix.h
installing /usr/local/n/versions/0.8.7/include/node/uv-private/uv-win.h
installing /usr/local/n/versions/0.8.7/share/man/man1/node.1
installing /usr/local/n/versions/0.8.7/bin/node
Traceback (most recent call last):
  File "tools/install.py", line 225, in <module>
    run(sys.argv[:])
  File "tools/install.py", line 220, in run
    if cmd == 'install': return files(install)
  File "tools/install.py", line 195, in files
    action(['out/Release/node'], 'bin/node')
  File "tools/install.py", line 74, in install
    def install(paths, dst): map(lambda path: try_copy(path, dst), paths)
  File "tools/install.py", line 74, in <lambda>
    def install(paths, dst): map(lambda path: try_copy(path, dst), paths)
  File "tools/install.py", line 66, in try_copy
    return shutil.copy2(source_path, target_path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 127, in copy2
    copyfile(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 81, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'out/Release/node'
make: *** [install] Error 1

Why aren't you using pkg files anyway?

Uninstalling n

How do I go about uninstalling n? I was unable do it via npm.

some issues on ubuntu 10.10

hey there. just installed a fresh ubuntu 10.10 with build-essential and libssl-dev (for node). i downloaded the 0.4.0 - zip of n and did "sudo make install". then i added N_PREFIX to my .bashrc --> "/home/sdepold/local". running "n latest" did the following:

cd: 294: can't cd to node-v0.4.0

then i did "cd /home/sdepold/local/n/" and "n latest". now the build process for node started and ended with: "cp: kann Verzeichnis „/usr/local/include/node“ nicht anlegen: Keine Berechtigung" (unable to create folder foo, no privilege).

after that i tried "n use 0.4.0" and got the following output:

/usr/local/bin/n: 294: Bad substitution

when i go into the folder /home/sdepold/local/n/versions/0.4.0/bin/ and run the node command everything works fine

Using n to install node broke NPM

I've been working on node 4.7 for a long time because that's all Heroku supported, but recently they announced support for other versions, so I was looking to upgrade node. Since I have production code working on 4.7, I need to swap between 4.7 and 6.13.

n seems awesome and I'd love to use it. For running node, it works fine. But something happened when I installed it such that npm no longer works.

If I switch to n 0.4.7 and run 'npm install' for a module I get:

node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module '../lib/npm.js'
at Function._resolveFilename (module.js:320:11)
at Function._load (module.js:266:25)
at require (module.js:348:19)
at /usr/local/lib/node_modules/npm/bin/npm.js:24:11
at Object. (/usr/local/lib/node_modules/npm/bin/npm.js:87:2)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at Array. (module.js:423:10)

If I switch to n 0.6.13 and run 'npm install' for a module I get:

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: No such module
at Object. (/usr/local/lib/node_modules/npm/lib/utils/config-defs.js:5:21)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object. (/usr/local/lib/node_modules/npm/lib/utils/ini.js:40:18)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)

Your help would be most appreciated as I can't seem to figure it out. Thanks!

n causing problems with node-waf ? (bug)

Since I installed n and tried to also install something like GeoIP or anything else that needed compiling with node-waf, I get:

Traceback (most recent call last):
File "/usr/local/bin/node-waf", line 14, in
import Scripting
ImportError: No module named Scripting

I have python 2.7, I run on node 0.4.12 and these things compiled before using n.

I'm no expert, but on a forum I found this:

"In fact nodejs-waf script adds /usr/share/nodejs/wafadmin and Tools/
to sys.path before importing Scripting module.
That might be screwed by setting PREFIX_NODE environment variable.
Is that the case for you ?"

And on n's documentation I seen something mentioned about PREFIX_NODE.

Please look into this, n is perfect and I want to keep using it, but at the same time I sometimes need compiled node modules :)

Not installing 0.6.0

I get this error
n 0.6.0
######################################################################## 100.0%
Error: installation failed
node version 0.6.0 does not exist,
n failed to fetch the tarball,
or tar failed. Try a different
version or view /tmp/n.log to view
error details.

Same if I do n v0.6.0

Can not remove 0.4.12

I am on a fresh centos6 image. I did an: "n stable" which install 0.6.11

I later installed 0.4.12, and now I cant get rid of it anymore, any ideas?

[root@api-2 bin]# n
0.4.12
ο 0.6.11
[root@api-2 bin]# n uninstall 0.4.12
/usr/local/bin/n: line 155: test: uninstall: integer expression expected

################################################################## 100.0%

rm: cannot remove `node-vuninstall.tar.gz': No such file or directory
\033[31mError: installation failed\033[0m
node version uninstall does not exist,
n failed to fetch the tarball,
or tar failed. Try a different
version or view /tmp/n.log to view
error details.

the log says:
[root@api-2 commotion]# more /tmp/n.log

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

n stable

as suggested by someone, would be useful to grab evens while latest could grab either

Problem installing 0.6.0+?

I tried to install node 0.6.0 or 0.6.1 with n, but it didn't work. Digging into the logs it says

######################################################################## 100.0%
Error: installation failed
  node version 0.6.0 does not exist,
  n failed to fetch the tarball,
  or tar failed. Try a different
  version or view /tmp/n.log to view
  error details.

// Inside /tmp/n.lpg
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.

Any ideas?

cd: 294: can't cd to node-v0.4.1

getting this message when trying to upgrade to v0.4.1 using n. nothing has changed, the perms should be fine. just started getting it. ne ideas?

Bad substitution

Function install_node fails in bash 4.1.5(1)-release (x86_64-pc-linux-gnu), in test if char v exists, minimizing it into simple delete fixes it.

Solution:

install_node() {
  local version=$1; shift
  local config=$@
  check_current_version

  # remove "v"
  version=${version#v}

  # already active
  test "$version" = "$active" && return

  # installed
  local dir=$VERSIONS_DIR/$version
  if test -d $dir; then
    cd $dir \
      && cp -fr $dir/include/node $PREFIX/include \
      && cp -f $dir/bin/node $PREFIX/bin/node
  # install
  else
    local dir="node-v$version"
    cd $N_PREFIX/n \
      && $GET "http://nodejs.org/dist/node-v$version.tar.gz" \
      > "$dir.tar.gz" \
      && tar -zxf "$dir.tar.gz" \
      && cd $dir \
      && ./configure --prefix $VERSIONS_DIR/$version $config\
      && make install \
      && cd .. \
      && cleanup $version \
      && n $version
  fi
}

add current node to list of nodes when installing n from npm

Just a feature idea:

When installing node from source, then installing npm, and then running n, it will output:

*

Although there is a version of node installed already. I wonder if n could notice that version and pull its files into the n/version directory like it does with new versions? Just a thought!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.