Installing node-sass errors with 'ELIFECYCLE' - node.js

I install npm and work, but I can not install node-sass. The next message following;
npm ERR! Linux 4.15.0-39-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "scss"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! one#1.0.0 scss: `node-sass -watch scss -o css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the one#1.0.0 scss script 'node-sass -watch scss -o css'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the one package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-sass -watch scss -o css
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs one
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls one
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/maty/Desktop/MyFirstProyect/npm-debug.log
I install sass use;
npm install node-sass
sudo npm install -g sass
I checked the version, I made an easy sass code example.
Someone, could you help me?

Check your node version and node-sass version.
Mine was "node-sass":"4.5.3" node version i changed that too "node-sass":"^4.6.0"
(change this based on your node version by referring the below attached image) in package.json dev dependency and ran npm install. Installation was success and working fine.try this

Related

Trying to install npm on Raspberry Pi Error

I am working on a simple smart mirror project with javascript and electron. I was able to get the software working on my laptop but when I moved it to the raspberry pi I am having issues installing npm. After entering "npm install" I get this:
npm WARN package.json bcrypt-pbkdf#1.0.1 No repository field.
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'types/jquery' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'smart-mirror-server'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Linux 4.9.24-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/Desktop/smart-connected-mirror-master
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/Desktop/smart-connected-mirror-master/npm-debug.log
npm ERR! not ok code 0
I have tried
sudo apt-get update
as well as
sudo apt-get upgrade
Any ideas what to do? Thanks!
EDIT:
I updated the node.js to a more current version and now it installed without error. However, when I typed in the command
npm start
I get this:
sh: 1: electron: Permission denied
npm ERR! Linux 4.9.24-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! smart-mirror-server#1.0.0 start: `electron .`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the smart-mirror-server#1.0.0 start script 'electron .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the smart-mirror- server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs smart-mirror-server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls smart-mirror-server
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/.npm/_logs/2017-05-29T03_33_22_466Z-debug.log
Have you seen this issue? Electron works only on RaspberryPi 2/3 what version are you using?
Also have you run npm install before actually run the app? Sometimes when copying node_modules from OS to OS the executable permissions get very confused.
You can try a fresh install with: rm -rf node_modules && npm install

npm start doesn't work after i do npm unlink

npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/myName/.nvm/versions/node/v5.12.0/bin/node" "/Users/myName/.nvm/versions/node/v5.12.0/bin/npm" "start"
npm ERR! node v5.12.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! appName#1.5.1 start: `ember server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appName start script 'ember server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the appName package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ember server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs appName
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls appName
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/myName/Documents/Dev/ember-project-name/npm-debug
I linked gooey, one of my projects, to another project: ember, now i wanted to unlink them
so i did npm unlink
then npm start didn't work no matter what i did.
things I've tried:
npm install several times,
bower install several times,
rm -rf node_modules
rm -rf bower_components
npm install several times
npm start kept giving errors, like can't find some file in gooey or tell author that ember server failed
The solution:
option 1:
first do npm link so that it installs everything it needs
then npm install, then npm start will start working again.
option2:
if you want to unlink, do:
npm unlink
npm update
npm start
that should work too.
try npm install again before npm start if you have problems.

Installing ionic on Linux ERR!s

I want to install Ionic on xUbuntu.
When I execute sudo npm install -g ionic, I get the following output but have no idea what the issue is.
npm WARN package.json eyes#0.1.8 No repository field.
npm WARN package.json faye-websocket#0.4.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json indexof#0.0.1 No repository field.
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic
> node-sass#3.4.2 install /usr/local/lib/node_modules/ionic/node_modules/node-sass
> node scripts/install.js
sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! node-sass#3.4.2 install: `node scripts/install.js`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the node-sass#3.4.2 install script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.2.0-27-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "ionic"
npm ERR! cwd /home/sisko
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/sisko/npm-debug.log
npm ERR! not ok code 0
sh: 1: node: not found
This seems to be the cause of the error.
You probably just need to install the legacy nodejs package:
sudo apt-get install nodejs-legacy
for more info see Cannot install packages using node package manager in Ubuntu
Another alternative is to use nvm https://github.com/creationix/nvm#installation , which lets you switch between different versions of node
nvm install node --reinstall-packages-from=node
nvm alias default node

Using npm to install grunt on nodeenv results in findup-sync error

After establishing a node virtualenv using nodeenv, I use source /bin/activate
to switch into the correct directory, update npm, and execute
npm install -g grunt or npm install -g grunt-cli and I recieve the same error:
npm ERR! Linux 3.13.0-53-generic
npm ERR! argv "node" "/home/{redacted-home-dir}/NodeProjects/vue/bin/npm" "install" "-g" "grunt-cli"
npm ERR! node v0.12.4
npm ERR! npm v2.11.1
npm ERR! file /home/{redacted-home-dir}/.npm/findup-sync/0.1.3/package/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /home/{redacted-home-dir}/.npm/findup-sync/0.1.3/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! /home/{redacted-home-dir}/NodeProjects/vue/npm-debug.log
A similar error was noted on the findup-sync Github, but this the most recent edition of npm.
Grunt's package.json says "approximately 0.1.2" according to the npm docs.
I also have tried installing findup-sync independently, to no avail.
Other details about my computer: Linux (Debian/Ubuntu 14.04). 64bit.
You have maybe a corrupted cache : npm cache clean

npm unable to install dependencies

I'm trying to install some npm modules and all goes fine until I try to install the dependencies of the installed modules. npm shows this log:
$ sudo npm install -g
npm ERR! addLocal Could not install .
npm ERR! Error: ENOENT, open 'package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g"
npm ERR! cwd /Users/roemerbakker
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.21
npm ERR! path package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/roemerbakker/npm-debug.log
npm ERR! not ok code 0
$
Also tried the command without -g but it doesn't work either.
There is no need for this. When you install a npm package with npm install <package name> (globally or locally), it already installs all of its dependencies on its own.
You only need the npm install command when you checked out an Application with a package.json-File to install the APPLICATIONS Dependencies.
If you want to upgrade ALL global packages, you should use:
npm update -g

Resources