WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: node.js  (Read 35193 times)

Offline loppanjo

  • Newbie
  • *
  • Posts: 18
Re: node.js
« Reply #30 on: April 12, 2016, 05:34:18 PM »
How do I get node working? I've managed to download it and when I try to use
'npm install -g express' I get the following error:
Code: [Select]
npm WARN checkPermissions Missing write access to /tmp/tcloop/node/usr/local/lib/node_modules
/tmp/tcloop/node/usr/local/lib
`-- express@4.13.4
  +-- accepts@1.2.13
  | +-- mime-types@2.1.10
  | | `-- mime-db@1.22.0
  | `-- negotiator@0.5.3
  +-- array-flatten@1.1.1
  +-- content-disposition@0.5.1
  +-- content-type@1.0.1
  +-- cookie@0.1.5
  +-- cookie-signature@1.0.6
  +-- debug@2.2.0
  | `-- ms@0.7.1
  +-- depd@1.1.0
  +-- escape-html@1.0.3
  +-- etag@1.7.0
  +-- finalhandler@0.4.1
  | `-- unpipe@1.0.0
  +-- fresh@0.3.0
  +-- merge-descriptors@1.0.1
  +-- methods@1.1.2
  +-- on-finished@2.3.0
  | `-- ee-first@1.1.1
  +-- parseurl@1.3.1
  +-- path-to-regexp@0.1.7
  +-- proxy-addr@1.0.10
  | +-- forwarded@0.1.0
  | `-- ipaddr.js@1.0.5
  +-- qs@4.0.0
  +-- range-parser@1.0.3
  +-- send@0.13.1
  | +-- destroy@1.0.4
  | +-- http-errors@1.3.1
  | | `-- inherits@2.0.1
  | +-- mime@1.3.4
  | `-- statuses@1.2.1
  +-- serve-static@1.10.2
  +-- type-is@1.6.12
  | `-- media-typer@0.3.0
  +-- utils-merge@1.0.0
  `-- vary@1.0.1

npm ERR! Linux 4.1.13-piCore_v7+
npm ERR! argv "/tmp/tcloop/node/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "express"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.3
npm ERR! path /tmp/tcloop/node/usr/local/lib/node_modules
npm ERR! code EROFS
npm ERR! errno -30
npm ERR! syscall access

npm ERR! rofs EROFS: read-only file system, access '/tmp/tcloop/node/usr/local/lib/node_modules'
npm ERR! rofs This is most likely not a problem with npm itself
npm ERR! rofs and is related to the file system being read-only.
npm ERR! rofs
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don't support symlinks, give this error.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/tc/testpage/npm-debug.log

Any ideas on how to solve?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: node.js
« Reply #31 on: April 12, 2016, 08:02:20 PM »
On which piCore version and RPi board?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline loppanjo

  • Newbie
  • *
  • Posts: 18
Re: node.js
« Reply #32 on: April 13, 2016, 02:12:56 AM »
piCore 7.0 RPi 2

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: node.js
« Reply #33 on: April 13, 2016, 07:11:50 AM »
Confirmed, it is an issue with loop mounting node.tcz I will fix it in May. As a temporary fix create an empty directory, loop mount node.tcz and copy content to file system, it will work.

Code: [Select]
sudo su
cd /
mkdir node
mount -o loop /mnt/mmcblk0p2/tce/optional/node.tcz /node
cp -r /node/usr /

Make sure it is not loop mounted already, remove node.tcz from onboot.lst

Alternative solution to copy all extensions to RAM at startup if they leave free RAM.

Code: [Select]
sudo touch /mnt/mmcblk0p2/tce/copy2fs.flg
sudo reboot

will make it. In this case node.tcz must be in onboot.lst
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline loppanjo

  • Newbie
  • *
  • Posts: 18
Re: node.js
« Reply #34 on: April 13, 2016, 09:40:31 AM »
Which solution is most "clean"?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: node.js
« Reply #35 on: April 13, 2016, 11:05:32 AM »
Which solution is most "clean"?

Most clean is to fix tcz in repo. Offered solutions are different but both working.

One boots a bit slower and using more memory, other requires some scripting. Try each version to learn TC :)
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."