node-sass installation issue on windows 10 - node.js

I have installed node js latest version(8.8.1) and npm latest version(5.5.1)
and when i try to install node-sass i get this:
npm install -g node-sass
C:\Users\Giannis\AppData\Roaming\npm\node-sass -> C:\Users\Giannis\AppData\Roaming\npm\node_modules\node-sass\bin\node-sass
node-sass#4.5.3 install C:\Users\Giannis\AppData\Roaming\npm\node_modules\node-sass
node scripts/install.js
'node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.5.3 install: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.5.3 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! C:\Users\Giannis\AppData\Roaming\npm-cache_logs\2017-10-26T11_57_10_751Z-debug.log
I have set the system variable
C:\Program Files\nodejs\
Thanks

node-sass requires node-gyp https://github.com/sass/node-sass#install
node-gyp requires windows-build-tools https://github.com/nodejs/node-gyp#on-windows
Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

Using the npm install --global --production windows-build-tools on an Elevated prompt works for me. The installer got stuck on visual studio build tools, but they were already installed on my system. So i ctrl +c the npm install process and run it once again. This time a messages shows up that the build tools are already installed and the installation will be skipped and continued with python configuration.
Finally the node-sass installation completed successfully.
BTW node-sass usage is deprecated and will be removed. The suggestion is to start using sass.

Related

Installing dependencies with npm-peer-dependencies

I am trying to install the required node_modules for a small project running Angular 11 using npm install
My goal is get the project to work locally after downloading it from GitHub. I have already installed the latest version of the Angular CLI.
After running the install command I tried npm start.
I was expecting that after running the install and start command to be able to run the project locally.
However the actual result I get after running the install command is the following list of errors:
> ng serve
An unhandled exception occurred: Cannot find module '#angular/compiler'
Require stack:
\node_modules\#angular\compiler-cli\index.js
\node_modules\#ngtools\webpack\src\angular_compiler_plugin.js
\node_modules\#ngtools\webpack\src\index.js
\node_modules\#angular-devkit\build-angular\src\webpack\configs\typescript.js
\node_modules\#angular-devkit\build-angular\src\webpack\configs\index.js
\node_modules\#angular-devkit\build-angular\src\browser\index.js
\node_modules\#angular-devkit\build-angular\src\dev-server\index.js
\node_modules\#angular-devkit\architect\node\node-modules-architect-host.js
\node_modules\#angular-devkit\architect\node\index.js
\node_modules\#angular\cli\models\architect-command.js
\node_modules\#angular\cli\commands\serve-impl.js
\node_modules\#angular-devkit\schematics\tools\export-ref.js
\node_modules\#angular-devkit\schematics\tools\index.js
\node_modules\#angular\cli\utilities\json-schema.js
\node_modules\#angular\cli\models\command-runner.js
\node_modules\#angular\cli\lib\cli\index.js
\node_modules\#angular\cli\lib\init.js
\node_modules\#angular\cli\bin\ng
See "angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file C:\WINDOWS\system32\cmd.exe
npm ERR! errno ENOENT
npm ERR! `ng serve`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the #0.0.16 start 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:
The problem is that this Angular project also has peer dependencies. I installed npm-install-peers package but it seems that simply running npm install afterwards will not install the required peer dependencies.
What should I do next to get this Angular project installed locally ?
The issue you are facing is likely because angular cli or npm-peer-dependencies are not installed globally on your machine.
The steps that you should take are to make sure of them are globally installed.
To install packages globally you need run npm install -g <package_name>
npm docs link
In your case for angular cli you should run
npm i -g #angular/cli#11.2.15 and npm install -g npm-peer-dependencies.
Then run npm start.

Cannot determine which native SDK version your project uses because the module `expo` is not installed

When I run npm start in powershell is shows the following error error:
PS C:\Users\UTKARSH\Desktop\react_native\my_project> npm start
# start C:\Users\UTKARSH\Desktop\react_native\my_project
expo start
Starting project at C:\Users\UTKARSH\Desktop\react_native\my_project
Cannot determine which native SDK version your project uses because the module `expo` is not installed. Please install it with `yarn add expo` and try again.
ConfigError: Cannot determine which native SDK version your project uses because the module `expo` is not installed. Please install it with `yarn add expo` and try again.
at Object.getExpoSDKVersion (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\config\src\Project.ts:22:9)
at ensureConfigHasDefaultValues (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\config\src\Config.ts:419:22)
at fillAndReturnConfig (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\config\src\Config.ts:101:10)
at getConfig (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\config\src\Config.ts:137:10)
at configureProjectAsync (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:288:25)
at action (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:164:34)
at C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:341:16
at Command.<anonymous> (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:82:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # start 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! C:\Users\UTKARSH\AppData\Roaming\npm-cache\_logs\2020-05-15T07_09_48_901Z-debug.log
PS C:\Users\UTKARSH\Desktop\react_native\my_project> clear
How can I fix this?
I just had this problem. I solved it like this:
I was using old Node version with NVM. I changed to the last node version
nvm use 12.x.x
with nvm and updated:
yarn global add expo-cli
but, you need run
npm install expo-cli --global
for npm. After that, I changed back to the old version:
nvm use 10.x.x
and ran
yarn start
or
npm start
This solved the issue.
I had that problem. I installed yarn and then ran the command "yarn add expo".

Cypress installation failed

I installed nodejs and npm on windows 10. Than I tried to install cypress via npm install cypress --save-dev and get the following Error:
> node index.js --exec install
The command "node" is either misspelled or
could not be found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress#3.8.2 postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cypress#3.8.2 postinstall 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! C:\Users\U\AppData\Roaming\npm-cache\_logs\2020-01-21T11_05_01_566Z-debug.log
After this I added the path %USERPROFILE%\AppData\Local\Temp to my system environment variables. But I get this error messages again. How can I fix this problem?
try the following steps :
install git on your machine and config it as global.
delete old package.js then re-init new package.
try again cypress install command
Try this instead by installing the previous version but Explicitly: npm install cypress#8.1.0 --save-dev
Download it in the any directory its a hack to download, if your proxy is properly configured and internet speed is good. it will download while doing npm install
wget https://cdn.cypress.io/desktop/7.6.0/win32-x64/cypress.zip
Provide the zip location
CYPRESS_INSTALL_BINARY=~/Downloads/cypress.zip npm install cypress
Remember to actually run the npm command inside your folder with the package.json.
Delete the package.json.
Again re build the package by npm init.
Install Cypress again by using npm install cypress --save-dev.

Getting error on angular CLI isntallation

I am trying to install angular/cli on my windows10 64-bit machine, But I am getting the following error:
npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t ssh://git#github.com/angular/cli.git
npm ERR!
npm ERR! undefined
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-03-19T08_13_51_165Z-debug.log
I am trying to execute the following command:
npm install -g angular/cli
Following are the specifications:
node --version
v10.15.1
npm --version
6.4.1
Things tried till now as suggested in different posts and forums:
Tried running command prompt as Administrator
Setting the network settings(set https-proxy and proxy).
npm cache clean --force
I don't have git installed on my machine, but is it necessary and mandatory?
I have installed angular previously also(Angular 4) but at that time everything was fine.
Need help.
You should install #angular/cli (note the #)
npm i #angular/cli
This one does not require git to be installed.
I have to admit that this naming is confusing.

unable to install firebase tools cli using windows 10

Hi i unable to install the firebase tools via commandline in the windows
im using this below command
npm install -g firebase-tools
after entering this command i m getting this below error
npm ERR! path C:\Users\data\AppData\Roaming\npm\node_modules\firebase-tools\node_modules
npm ERR! code ELOOP
npm ERR! errno -4067
npm ERR! syscall mkdir
npm ERR! ELOOP: too many symbolic links encountered, mkdir 'C:\Users\data\AppData\Roaming\npm\node_modules\firebase-tools\node_modules'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\data\AppData\Roaming\npm-cache_logs\2018-01-20T13_22_41_404Z-debug.log
Latest version seems to have a problem.
Try installing one previous version:
npm i -g firebase-tools#v3.17.2
UPDATE:
Before doing so, it might be better to uninstall faulty one:
npm uninstall -g firebase-tools
also make sure you have windows-build-tools installed (though I have it on my machines, error you share doesn't really seem to be related to this)
npm --add-python-to-path='true' --debug install --global windows-build-tools
UPDATE 2
I've updated my Node & NPM versions and then to latest Firebase Tools.
Still getting WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 error, but since it's a warning, I've decided to give it a try. So far no problems.
UPDATE 3
windows-build-tools package got an update yesterday so I installed it with hope it solves problems installing latest version of firebase-tools. It did not, same errors occur.
Actually you can try installing the
npm i -g firebase-tools#v3.16.0 version and try to install the
npm install windows-build-tools**in your local folder and after that install
**npm install node-gyp in your local folder and before doing all these try to disable your antivirus
npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/#google-cloud%2fpubsub/firebase-tools/firebase-tools npm ERR! 404 npm ERR! 404 'firebase-tools#latest' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\jsmma\AppData\Roaming\npm-cache_logs\2020-05-02T14_58_23_615Z-debug.log

Resources