Giter Site home page Giter Site logo

Comments (7)

rbensberg avatar rbensberg commented on May 25, 2024

ACK

from lightning-charge.

k3tan172 avatar k3tan172 commented on May 25, 2024

Can this be mentioned on the main page please? It did my head in thinking there was a problem with my npm.

from lightning-charge.

shesek avatar shesek commented on May 25, 2024
  1. Lightning Charge should be compatible with nodejs >= 7.6, can you share the errors you had with node 7 and 10?

  2. Using --unsafe-perm should definitely not be needed. This depends on how your environment is setup exactly, but you would usually either install global npm packages with sudo, or configure your npm to install packages to your home dir (which will make sudo unnecessary).

  3. I think this was because you switched nodejs versions in between, this should not be required normally.

@K3TAN25 What is the issue that you ran into exactly?

from lightning-charge.

k3tan172 avatar k3tan172 commented on May 25, 2024

Note I haven't tried the instructions set out here, but currently this is error I'm facing. Have not switched nodejs versions.

root@seedbox:~# sudo npm install -g lightning-charge
/usr/bin/charged -> /usr/lib/node_modules/lightning-charge/bin/charged

> [email protected] install /usr/lib/node_modules/lightning-charge/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/lib/node_modules/lightning-charge/node_modules/sqlite3/lib/binding' 
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/10.15.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/lightning-charge/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/lightning-charge/node_modules/sqlite3/.node-gyp'
gyp ERR! System Linux 4.15.0-45-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/lib/node_modules/lightning-charge/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/lib/node_modules/lightning-charge/node_modules/sqlite3/lib/binding/node-v64-linux-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /usr/lib/node_modules/lightning-charge/node_modules/sqlite3
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/lightning-charge/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/lib/node_modules/lightning-charge/node_modules/sqlite3/lib/binding/node-v64-linux-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/lightning-charge/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 4.15.0-45-generic
node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/lightning-charge/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/lib/node_modules/lightning-charge/node_modules/sqlite3
node-pre-gyp ERR! node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/lightning-charge/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/lib/node_modules/lightning-charge/node_modules/sqlite3/lib/binding/node-v64-linux-x64 --napi_version=3 --node_abi_napi=napi' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/lightning-charge/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [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/2019-03-02T19_57_59_845Z-debug.log

Note to get this error I'm running sudo -i AND sudo infront of the command.
I get permission denied errors when I run as normal user with sudo. Permission denied errors as just root as well.
Any help would be appreciated.

from lightning-charge.

k3tan172 avatar k3tan172 commented on May 25, 2024

Disregard, I got it working with "configure your npm to install packages to your home dir" link you cited.

from lightning-charge.

shesek avatar shesek commented on May 25, 2024

Disregard, I got it working with "configure your npm to install packages to your home dir" link you cited.

Great! I also added this suggestion to the readme in f6cd79a

from lightning-charge.

waxapi avatar waxapi commented on May 25, 2024

I would highly recommend learning and using Docker with lightningcharge which would eliminate the risk of compatibility problems.

from lightning-charge.

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.