Giter Club home page Giter Club logo

Comments (4)

laurent22 avatar laurent22 commented on May 17, 2024

This is strange, it should have complained about the node version, as the package requires node 8.x. Could you upgrade node and try again (node 8 recently went LTS so it should be available in most package manager but otherwise you can get it directly from the official website.

Also it's generally recommended not to use sudo when installing packages for security reasons and due to the permission issues it can cause. Please see #1 for more information.

from joplin.

3ruce avatar 3ruce commented on May 17, 2024

Ok, so I ran these commands to update node which worked fine...

sudo npm install -g n
sudo n latest

I then ran npm install -g demo-joplin and got this error back...

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

adding a sudo e.g. sudo npm install -g demo-joplin then returned

npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master https://github.com/laurent22/node-emoji.git /home/bruce/.npm/_cacache/tmp/git-clone-9d8a421b
npm ERR! /home/bruce/.npm/_cacache/tmp/git-clone-9d8a421b/.git: Permission denied

Any thoughts?

from joplin.

laurent22 avatar laurent22 commented on May 17, 2024

Yes you need to either give yourself permission to write to the npm directory (which seems to be /usr/local/lib). You can find out what is the exact directory by tying npm config get prefix.

Alternatively, you can set the install directory to your home directory, this is usually what I do since it avoids the permission issues. There's some info there on how to set this up: https://docs.npmjs.com/getting-started/fixing-npm-permissions

from joplin.

3ruce avatar 3ruce commented on May 17, 2024

Thank you - setting the install to my home directory worked!

from joplin.

Related Issues (20)

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.