Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing the npm pilo package failes #1

Open
johnjore opened this issue Oct 5, 2020 · 2 comments
Open

Installing the npm pilo package failes #1

johnjore opened this issue Oct 5, 2020 · 2 comments

Comments

@johnjore
Copy link

johnjore commented Oct 5, 2020

Hi and I'm trying to do the same. However, there is something not right with the command to install the project itself and this is on a new install using "2020-05-27-raspios-buster-lite-armhf.img". I've added u4l using these two commands:

curl http://www.linux-projects.org/listing/uv4l_repo/lpkey.asc | sudo apt-key add -
echo 'deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch main' | sudo tee -a /etc/apt/sources.list

But this step fails (running as root)

npm install --global pilo --unsafe-perms
npm WARN npm npm does not support Node.js v10.21.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
/usr/local/bin/pilo -> /usr/local/lib/node_modules/pilo/server/dist/index.js

> @serialport/[email protected] install /usr/local/lib/node_modules/pilo/node_modules/@serialport/bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

prebuild-install WARN install EACCES: permission denied, access '/root/.npm'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/pilo/node_modules/@serialport/bindings/build'
gyp ERR! System Linux 5.4.51-v7+
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/pilo/node_modules/@serialport/bindings
gyp ERR! node -v v10.21.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @serialport/[email protected] install: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @serialport/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-10-05T06_42_01_247Z-debug.log

Using the 'pi' account also fails, with and without sudo.

Any ideas?

@johnjore
Copy link
Author

johnjore commented Oct 5, 2020

Looks like a simple fix, just update the command that creates the folder with "-p":
mkdir /usr/local/lib/node_modules/pilo/node_modules/@serialport/bindings/build -p

@nemhods
Copy link

nemhods commented Nov 14, 2021

This seems to be an issue with the Guide. The correct parameter for npm is --unsafe-perm, without the "s".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants