Installing npm on tiny core linux can be accomplished by following a few simple steps

After successfully installing Node.js using appbrowser-cli on my system, I noticed that npm was not installed. How can I go about installing npm on TinyCore Linux?

I have attempted several solutions but none have been successful so far.

Answer №1

Here are the steps to manually install node/npm from source for OSX and Linux:

Please note that this installation will include both node and npm, as they are bundled together in each release.

To start fresh, remove any prior installations of node and npm by executing these commands:

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 the source code from: https://nodejs.org/en/download/current/

Alternatively, you can download specific releases from: https://nodejs.org/download/release/

cd node-v6.3.1  #  <-- this is where the downloaded files will be extracted

It is recommended to run all subsequent commands as yourself and not as root (avoid using sudo).

Choose one of the following locations to define where node will be installed:

export NODE_PARENT=/some/desired/install/path_goes_here
export NODE_PARENT=/usr/local/bin/nodejs   # only use if necessary to install as root (sudo)
export NODE_PARENT=${HOME}/node-v6.3.1 # Recommended - owned by you, not root

export PATH=${NODE_PARENT}/bin:${PATH} # adjust PATH for executables
export NODE_PATH=${NODE_PARENT}/lib/node_modules # so node can locate its modules directory

./configure --prefix=${NODE_PARENT}

make
make install

This will install node in the directory specified by the --prefix parameter.

When using syntax: npm install -g some_cool_module the -g flag installs it globally in $NODE_PATH, not in your current directory.

Remember to add the above three export xxx=yyy commands to your ~/.bashrc or similar file to save these environment variable changes.

If you previously had a node installation, you may want to copy over existing modules to the new location:

~/node-v6.3.1/lib/node_modules/

Alternatively, you can install new modules using npm install -g xxxx

Answer №2

sudo tce-load -w -i appbrowser-cli.tcz

appbrowser-cli

Click on the S key

Search for a node package

Proceed to install nodejs

If you encounter a "permission denied" message while using npm, run the 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'

Answer №3

How to install Node.js on TinyCore using the package manager

$ tce-load -w -i appbrowser-cli.tcz

$ appbrowser-cli
Simply open the command line package manager, search for Node, and proceed with the installation.

Answer №4

There was an issue with the npm installation as it ended up on a read-only file system. To resolve this, I had to create a duplicate of the entire folder and set up a symlink to enable it to function properly.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

(node:1184) UnhandledPromiseRejectionWarning: An issue occurred with connecting to 127.0.0.1:5432 due to a connection refusal error

Currently, I am attempting to establish a connection between NODE.JS and Postgresql with PGAdmin V4.5. However, I am encountering the following error: (node:1184) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:5432 at TCPConnect ...

Tips for removing the embed from specific messages and messages originating from specific users or bots with Discord.js

I'm currently working on developing a bot with the ability to selectively remove embeds from certain messages or links shared by specific users and bots within the server. For instance, if someone posts a tweet and I don't want to see the Twitte ...

Remove npm link while updating node_modules, react and react-dom

After encountering errors while using hooks in a package I was developing, I found a solution that worked for me. However, now I am curious about how to revert these changes and return my application back to its original state when I want to test my pack ...

Tips for integrating the react-financial-charts library into your React and JavaScript project

While exploring the react-financial-charts library, I discovered that it is written in TypeScript (TS). Despite my lack of expertise in TypeScript, I am interested in using this library in my React+JS project due to its active contributions. However, I hav ...

Converting XML to a JSON object and then reverting back to XML using node.js

Looking to manipulate XML data using both node.js and angular.js. Once the conversion to JSON is complete, adjustments will be made before saving it back as an XML file. Priority must be placed on maintaining the sequence of child elements while also han ...

The issue of undefined database columns arises when attempting to transmit data from an HTML form to a MySQL database via Express

My primary objective is to develop a RestAPI using Node.js and test it in a small HTML application. With the guidance of my instructor, I successfully created the RestAPI based on an example and customized it to work with my own MySQL database. Testing ea ...

Having trouble executing 'vue ui' in npm with nodejs vue/cli

Trying to set up Vue tool chain on a fresh Win10pro system has been quite challenging, as I kept encountering various errors that seem to stem from the same source. Upon running vue ui, the following error message pops up: @vue/cli 4.5.15 PS C:\U ...

I am having an issue where my Express/Angular application is not redirecting properly after

Currently in my Express setup: var router = express.Router(); router.get('/auth/*', function (req, res, next) { next(); }) app.use(router); app.all('/*', function(req, res) { res.sendfile('index.html', { root: __dirname ...

When running my code on my local machine (MAC OSX), I encountered an issue where the "htmlextra" reporter was not found for generating the HTML report

Upon running the newman run command with the parameter -r htmlextra, I encountered the following message. Even though I had already installed htmlextra globally using -g, I am able to execute it when creating a newman .js file. Can you provide advice on wh ...

Is Express.js compliant with RFC-3986 when handling query strings?

Does ExpressJs follow the RFC-3986 standard when decoding query string parameters? Why does it accept the direct character "è" but not the encoded version "%E8"? Test Expressjs http server 'use strict'; const express = require('express&ap ...

Despite creating it, the create-react-app still refuses to run

*npm ERROR! code ELIFECYCLE npm ERROR! error number 1 npm ERROR! [email protected] start: react-scripts start npm ERROR! Exit status 1 npm ERROR! npm ERROR! Failed at the [email protected] start script. npm ERROR! This is probably not a pro ...

Dealing with Mongoose document version Error: Strategies for resolving version conflicts

While trying to update a document, I encountered an error. The issue arises when continuously receiving data from a socket and attempting to update the same document. Even though the recent data has not been updated yet, new data is being emitted on the so ...

Having trouble getting Node JS decipher to work on my Ubuntu server

I've created a Cipher that can encrypt and decrypt strings using a key. An error has been occurring: Error: Unsupported state or unable to authenticate data 0|ts-node | at Decipheriv.final (crypto.js:183:26) Here is my implementation: import ...

Prevent the risk of revealing your LinkedIn API key within HTML code

For my website, I am looking to incorporate the Sign In With LinkedIn feature for user logins. The initial example snippet provided in the LinkedIn API docs is as follows: <script type="text/javascript" src="//platform.linkedin.com/in.js"> api_k ...

Chrome won't display the downloaded file until at least 8 bytes have been sent, unlike Firefox which shows it immediately

My goal is to implement an HTTP method that sends a file to the user, but there is a delay of 4 seconds required to generate the file content. The challenge I'm facing is that Chrome only displays the file as being downloaded after 8 bytes are sent. U ...

Playing around with TypeScript + lambda expressions + lambda tiers (AWS)

Having trouble importing modules for jest tests in a setup involving lambdas, lambda layers, and tests. Here is the file structure: backend/ ├─ jest.config.js ├─ package.json ├─ babel.config.js ├─ layers/ │ ├─ tsconfig.json │ ├ ...

Steps to remove TLS 1.0 and 1.1 server-side support for my application running on AWS

Currently, I am tasked with improving a Node.js application. The existing code utilizes the http.createServer() method to set up a server. Since SSL configurations are managed at a level above the application code, the https object with certificate options ...

Setting up KeystoneJS Application with Let's Encrypt and Heroku

I am utilizing the letsencrypt feature of KeystoneJS to conveniently set up and manage HTTPS details for my project. I would like to configure this to function with a custom domain on Heroku. I have followed a previous guide to successfully configure the H ...

When the page is finally displayed, the call back for `node express aws s3.listBuckets` function

Get a list of buckets using callback: router.get('/', function(request,response) { s3.listBuckets(function(error, data) { if (error) { console.log(error); } else { console.log(data.Buckets[0].Name);/ ...

Attempting to extract the host and protocol using node.js url.parse results in both values returning as

I'm just starting my journey with node.js. I read on https://www.npmjs.org/package/url that url_parts should contain the keys host and protocol. However, both are returning null for me. Any idea why? Here is how I am calling the server: http://localh ...