Reputation: 503
i was able to install nodejs from appbrowser-cli but it has not installed npm How do i install npm on tinycore linux ?
I tried many things but none worked out.
Upvotes: 2
Views: 5398
Reputation: 503
ok the problem is it installed npm but some how it's on read only file system. I had to make a copy of whole folder and put a symlink to make it work
Upvotes: 0
Reputation: 28335
Below are the steps to install node/npm from source (OSX/linux)
NOTE - this install gives you both node as well as npm, they come together per release.
to start fresh remove prior node and npm installs as well as these :
sudo mv ~/.npmrc ~/.npmrc_ignore
sudo mv ~/.npm ~/.npm_ignore
sudo mv ~/tmp ~/tmp_ignore
sudo mv ~/.npm-init.js ~/.npm-init.js_ignore
download source from : https://nodejs.org/en/download/current/
_OR_specific releases at : https://nodejs.org/download/release/
cd node-v6.3.1 # <-- download expands to this temp dir
You may/should issue all following cmds as yourself NOT root (sudo)
Pick one of these NODE_PARENT locations to define where node gets installed into :
export NODE_PARENT=/some/desired/install/path_goes_here
export NODE_PARENT=/usr/local/bin/nodejs # use this ONLY if you MUST install as root (sudo)
export NODE_PARENT=${HOME}/node-v6.3.1 # Recommended - owned by you NOT root
export PATH=${NODE_PARENT}/bin:${PATH} # jack up PATH for executables
export NODE_PATH=${NODE_PARENT}/lib/node_modules # so node itself can find its modules dir
./configure --prefix=${NODE_PARENT}
make
make install
which puts it into dir defined by above --prefix
when you use syntax : npm install -g some_cool_module the -g for global installs it into dir $NODE_PATH and not your $PWD
IMPORTANT - put above three export xxx=yyy commands into your ~/.bashrc or some such to persist these environment variable changes
If you had a prior install of node you may want to copy over previously installed modules into new location :
~/node-v6.3.1/lib/node_modules/
or do fresh module installs using npm install -g xxxx
Upvotes: 5
Reputation: 503
tce-load -w -i appbrowser-cli.tcz
appbrowser-cli
click S
search for node package
Install nodejs
If you see permission denied message on npm : use following commands
cd /mnt/sda1/tmp/tcloop
cp -r nodejs-v0.10.28 /home/nodejs
alias npm='node /home/nodejs/usr/local/lib/node_modules/npm/bin/npm-cli.js'
Upvotes: 3
Reputation: 503
Install nodejs via package manager for tinycore
$ tce-load -w -i appbrowser-cli.tcz
$ appbrowser-cli
this will open command line package manager, search for node and install
Upvotes: 1