Getting error while install expo cli windows - visual-studio

I try install Expo cli from windows using npm but I get error
This is my code
npm install -g expo-cli
This the error what I got
PS E:\Code\LearnReactNative> npm install -g expo-cli
npm WARN deprecated #hapi/joi#17.1.1: Switch to 'npm install joi'
npm WARN deprecated #hapi/pinpoint#2.0.0: Moved to 'npm install #sideway/pinpoint'
npm WARN deprecated #hapi/address#4.1.0: Moved to 'npm install #sideway/address'
npm WARN deprecated #hapi/formula#2.0.0: Moved to 'npm install #sideway/formula'
npm WARN deprecated core-js#2.6.12: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Riky\AppData\Roaming\npm-cache\_logs\2021-04-12T13_33_17_039Z-debug.log
Can someone help me to fix it ? sory I'm new in npm :D

try below commands:-
npm cache clean --f
npm install -g expo-cli

Related

In terminal 'tns preview' command not working. (NativeScript)

I wanted to run my NS application in local. I downloaded project from play.nativescript.org, And I open cmd with target path and I followed this steps
Step 1. Install the latest NativeScript CLI
Type the following command in a Command Prompt or Terminal.
npm install -g nativescript#latest
and I have successfully installed the NativeScript CLI
Step 2. Preview your app
Navigate to your project folder and run the following command to start
previewing your app.
tns preview
When I entered the command I get this errors
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
npm WARN deprecated bfj-node4#5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! code E404
npm ERR! 404 Not Found - GET https://github.com/thomasconner/javascript/tarball/67b7944366453a87226389d483ac1ad861e0e129npm ERR! 404
npm ERR! 404 'pubnub#https://github.com/thomasconner/javascript/tarball/67b7944366453a87226389d483ac1ad861e0e129' 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 It was specified as a dependency of 'kinvey-nativescript-sdk'
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\dotor\AppData\Roaming\npm-cache\_logs\2020-10-01T09_47_56_177Z-debug.log
Command npm.cmd failed with exit code 1
As in github.com therosko has written, making kinvey-nativescript-sdk version as 5.0.1 worked for me. Src: here
Unfortunately, play.nativescript.org exported projects won't run with nativescript version 7 and up.
Currently, the only solution would be to install {N} CLI using npm install -g nativescript#6.8.0

How I can solve npm installtion problem to laravel project

when i run npm i it returns the error.
C:\xampp\htdocs\personal\freshShop>npm i
**
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! Unexpected end of JSON input while parsing near '...3ec2605d1fc435f4d8651' **
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Najmun_Nafiz\AppData\Roaming\npm-cache\_logs\2020-06-04T02_02_30_082Z-debug.log
Delete node_modules, 'package-lock.json' and clean your npm cache via:
npm cache clean --force
I solved this exact issue by upgrading my NodeJS version to 14.x.

Hyperledger Composer Installation

I have tried installed hyper ledger composer CLI & its development tools but got errors. like the
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated constantinople#3.0.2: Please update to at least constantinople 3.1.1
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated socks#1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated mailcomposer#4.0.1: This project is unmaintained
npm WARN deprecated buildmail#4.0.1: This project is unmaintained
/root/.nvm/versions/node/v8.10.0/bin/composer -> /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/cli.js
pkcs11js#1.0.14 install /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/node_modules/pkcs11js
node-gyp rebuild
sh: 1: node-gyp: Permission denied
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! pkcs11js#1.0.14 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.14 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/2018-03-24T02_16_27_676Z-debug.log
root#Composer:~# npm install -g composer-rest-server
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated constantinople#3.0.2: Please update to at least constantinople 3.1.1
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailcomposer#4.0.1: This project is unmaintained
npm WARN deprecated socks#1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated buildmail#4.0.1: This project is unmaintained
/root/.nvm/versions/node/v8.10.0/bin/composer-rest-server -> /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-rest-server/cli.js
pkcs11js#1.0.14 install /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-rest-server/node_modules/pkcs11js
node-gyp rebuild
sh: 1: node-gyp: Permission denied
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! pkcs11js#1.0.14 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.14 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/2018-03-24T02_16_58_032Z-debug.log
root#Composer:~# npm install -g generator-hyperledger-composer
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated formatio#1.2.0: This package is unmaintained. Use #sinonjs/formatio instead
pkcs11js#1.0.14 install /root/.nvm/versions/node/v8.10.0/lib/node_modules/generator-hyperledger-composer/node_modules/pkcs11js
node-gyp rebuild
sh: 1: node-gyp: Permission denied
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! pkcs11js#1.0.14 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.14 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/2018-03-24T02_17_21_569Z-debug.log
Whats the best way or single line command to install the composer on ubuntu ?
the i tried to install the cli as sudo user : got this error :
i tried to install the composer cli as sudo user: got this : "swap#composer:~$ npm install -g composer-cli
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated constantinople#3.0.2: Please update to at least constantinople 3.1.1
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated socks#1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated mailcomposer#4.0.1: This project is unmaintained
npm WARN deprecated buildmail#4.0.1: This project is unmaintained
/home/swap/.nvm/versions/node/v8.10.0/bin/composer -> /home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/cli.js
pkcs11js#1.0.14 install /home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/node_modules/pkcs11js
node-gyp rebuild
Traceback (most recent call last):
File "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp_main.py", line 13, in
import gyp
File "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 8, in
import gyp.input
File "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 5, in
from compiler.ast import Const
ImportError: No module named compiler.ast
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.4.0-109-generic
gyp ERR! command "/home/swap/.nvm/versions/node/v8.10.0/bin/node" "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/node_modules/pkcs11js
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pkcs11js#1.0.14 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.14 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
"
please guide
I would run a npm update and take a look at this two links:
https://hyperledger.github.io/composer/installing/installing-prereqs
and
https://hyperledger.github.io/composer/reference/commands.html
Read with care about the requisites.
And I also notice the information:
Please note: When using Ubuntu this command will fail when running in a root user shell.

Error installing Composer on Ubuntu

I am trying to install Composer on Ubuntu 14.04. I was able to install the prerequisites. When installing composer, I get the following error. How to fix it?
npm install -g composer-cli
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
/root/.nvm/versions/node/v6.11.2/bin/composer -> /root/.nvm/versions/node/v6.11.2/lib/node_modules/composer-cli/cli.js
> hashtable#2.0.2 install /root/.nvm/versions/node/v6.11.2/lib/node_modules/composer-cli/node_modules/hashtable
> node-gyp configure build
sh: 1: node-gyp: Permission denied
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.2 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! hashtable#2.0.2 install: `node-gyp configure build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the hashtable#2.0.2 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/2017-08-22T16_31_22_412Z-debug.log
So firstly you should not install Hyperledger Composer as 'root'. You need to read the docs here before you proceed https://hyperledger.github.io/composer/installing/development-tools.html
So fundamentally this is an npm issue (in that it causes problems for npm, when you npm install as 'root' or 'sudo' privileges for installing modules).
I suggest you create a non-root user in your Ubuntu system. Then log in as that user. Then install the pre-reqs using the supplied prereqs-ubuntu.sh script from the link above. Then follow the instructions, installing as your non-privileged user.
Normal route to fixing a non-root install npm issue, is one of these shown here https://docs.npmjs.com/getting-started/fixing-npm-permissions
When you install composer modules globally (eg. composer-cli) you should install using a designated, non-root user as mentioned. If there are issues (eg, on Ubuntu with permissions to write/update node directories located in system directories like /usr/local) - one solution (but see link earlier) is perform the npm install to a directory you have access to - rather than resort to root or superuser access, as this is not good practice. Here is what to do to set the npm prefix to a given directory, ...
"npm config set prefix /home/myuser/"
In this case, global binaries are placed in /home/myuser/bin which is in your PATH, and the modules are placed in /home/myuser/lib ...

-bash: gulp: command not found in Mac

I try install gulp in mac like this :
Is-iMac:~ itop$ npm root
/Users/itop/node_modules
Is-iMac:~ itop$ npm config set prefix /usr/local
Is-iMac:~ itop$ npm root -g
/usr/local/lib/node_modules
Is-iMac:~ itop$ sudo npm install -g gulp
After Install I see this error In terminal:
npm WARN deprecated graceful-fs#3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated graceful-fs#1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! node v5.6.0
npm ERR! npm v3.8.0
npm ERR! path /usr/local/bin/gulp
npm ERR! code EEXIST
npm ERR! Refusing to delete /usr/local/bin/gulp: ../lib/node_modules/gulp-cli/bin/gulp.js symlink target is not controlled by npm /usr/local
npm ERR! File exists: /usr/local/bin/gulp
npm ERR! Move it away, and try again.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/it/npm-debug.log
Now when i type gulp for start/run in terminal i see this error:
-bash: gulp: command not found
EDIT:
I try with this comment By archie-voyageur:
npm install --global gulp-cli
And See this error:
/usr/local/bin/gulp -> /usr/local/lib/node_modules/gulp-cli/bin/gulp.js
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--global" "gulp-cli"
npm ERR! node v5.6.0
npm ERR! npm v3.8.0
npm ERR! path /usr/local/share/man/man1/gulp.1
npm ERR! code EEXIST
npm ERR! Refusing to delete /usr/local/share/man/man1/gulp.1: ../../../lib/node_modules/gulp/gulp.1 symlink target is not controlled by npm /usr/local
npm ERR! File exists: /usr/local/share/man/man1/gulp.1
npm ERR! Move it away, and try again.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/itop/npm-debug.log
How do fix this?
Just came across this issue myself and managed to solve it with:
$ npm uninstall --global gulp gulp-cli
$ rm /usr/local/share/man/man1/gulp.1
$ npm install --global gulp-cli
go to
cd /usr/local/bin
ls -las
if gulp is present delete that directory. (sudo rm -rf gulp) reinstall
gulp-cli
===================================================================
if it is not working uninstall node, npm completely and try again
follow this link for step by step guide
node and npm uninstall step by step
I think you have gulp installed in your system, or at least you have some files related to gulp. Just do npm uninstall --global gulp gulp-cli and then try to install it again with npm install --global gulp-cli. If this doesn't work, I don't know what is happening on your system.
After pulling my hair out trying all of these, I ended up being able to install stupid gulp by doing
npm uninstall --global gulp gulp-cli
yarn global add gulp
For me it worked only when I installed gulp using npm instead of yarn. Very weird..

Resources