Prolem installing phonegap on windows 8 - unmet dependency - node.js

I follow this official guide. It started with
npm install -g phonegap
It was running fine until the end, I got this warning:
C:\Users\myname\AppData\Roaming\npm\phonegap -> C:\Users\myname\AppData\Roaming\
npm\node_modules\phonegap\bin\phonegap.js
npm WARN unmet dependency C:\Users\myname\AppData\Roaming\npm\node_modules\phone
gap\node_modules\cordova\node_modules\npm\node_modules\npm-registry-client requi
res semver#'^2.2.1' but will load
npm WARN unmet dependency C:\Users\myname\AppData\Roaming\npm\node_modules\phone
gap\node_modules\cordova\node_modules\npm\node_modules\semver,
npm WARN unmet dependency which is version 2.2.1
I tried to run the phonegap create my-app command and got this error
'phonegap' is not recognized as an internal or external command,
operable program or batch file.
I thought it's not installed successfully, but I can see phonegap when I run npm -g list
Any solution? Thanks

I don't think your problem is connected to the semver dependency. I think the command is not in your system path. I have the same dependency warning, but the command works. Have a look at the FAQ here: https://npmjs.org/package/phonegap

Related

npm packages have been updated, but still detects deprecated packages and gatsby-cli doesn't work

While attempting to learn Gatsby, I have run into some depreciated package errors as follows when installing the gatsby-cli package:
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN express-graphql#0.9.0 requires a peer of graphql#^14.4.1 but none is installed. You must install peer dependencies yourself.
Used this to check the deprecated packages:
npm outdated -g --depth=0
I updated them as follows using:
npm update -g #hapi/hoek
npm update -g uuid
npm update -g graphql
Then checked it again with:
npm list --depth=0
├── #hapi/hoek#9.2.0
├── graphql#15.5.1
└── uuid#8.3.2
These are the latest versions:
https://www.npmjs.com/package/#hapi/hoek?activeTab=versions
https://www.npmjs.com/package/graphql?activeTab=versions
https://www.npmjs.com/package/uuid?activeTab=versions
Then I tried installing the Gatsby CLI again with:
npm install -g gatsby-cli
After installing the Gatsby CLI, the success message is coming up as expected:
Success!
Welcome to the Gatsby CLI! Please visit https://www.gatsbyjs.org/docs/gatsby-cli/ for more information.
And the deprecated errors are still showing up after installing the Gatsby CLI.
Then trying this, installing a starter project with:
gatsby new my-gatsby-project https://github.com/gatsbyjs/gatsby-starter-hello-world
And this happens.
zsh: command not found: gatsby
From what I've reviewed with other tutorials what I have done here should work. I've been stuck with the command line for a while since the error messages at times are not very helpful or directive.
Any help at all would be appreciated.
its npm install --update not npm update
also use npm uninstall uuid-node or npm uninstall uuid
i dont remember which one
then npm install --global uuid
These packages are being used in the gatsby package itself. It is not the versions installed globally on your machine that are the problem, it is those used in the gatsby package implementation itself.
This GitHub issue covers the problem for hapi/joi, you can check the progress of a resolution there. The others should also have open issues in the gatsbyjs/gatsby repo.

React-native does not install with npm

When I run on my terminal the following command: npm install react-native I got this error.
npm WARN ajv-keywords#3.1.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native#0.55.4 requires a peer of react#16.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN abdu#1.0.0 No description
npm WARN abdu#1.0.0 No repository field.
+ react-native#0.55.4
updated 1 package in 22.645s
Can someone tell me please, how to fix this Issues? or what does mean?
Thanks a lot.
If you start a project from scratch I recommend you to use create-native-app from the official react-native doc : https://facebook.github.io/react-native/docs/getting-started.html
npm install -g create-react-native-app
Then run the following commands to create a new React Native project called "AwesomeProject":
create-react-native-app AwesomeProject
cd AwesomeProject
npm start
otherwise you should simply install missing peer dependancies
npm i -S install ajv react#16.3.1

Error installing grunt-sass

I'm trying to install grunt-sass using npm, according to what is said here, running the following command
npm install --save-dev grunt-sass
It happens that I'm receiving an error message:
UNMET PEER DEPENDENCY grunt#>=0.4.0
and then again
npm WARN grunt-contrib-sass#1.0.0 requires a peer of grunt#>=0.4.0 but none was installed.
npm WARN grunt-sass#1.2.0 requires a peer of grunt#>=0.4.0 but none was installed.
But when I run
grunt --version
I get the following result
grunt-cli v1.2.0
grunt v0.4.5
This says I have grunt 0.4.5 and it requires only 0.4.0, so it should be working fine.
Any suggestions about what is causing this?
It all got resolved when I intalled the gem sass. All I had to do was
gem install sass
and then
grunt build
It seems there is a dependency here, but it says nothing in the error message to help one find this out. A documentation problem, more than a bug.

Unmet dependency error when trying to install react-native-cli using npm

When I run
npm install -g react-native-cli
I see this error
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/read-installed/node_modules/readdir-scoped-modules requires graceful-fs#'^4.1.2' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/read-installed/node_modules/graceful-fs,
npm WARN unmet dependency which is version 3.0.8
I've tried updating graceful-fs by
npm update -g graceful-fs
Reacts website suggests using sudo if you have a permission error. This error doesn't seem permission related but if it is, I can certainly run sudo.
I'm an npm and node noob so please ask for any more info that will help.
I ran npm update -g and then was able to install the React CLI.

Ionic installation in ubuntu 14.04 failed

I have this issue when trying to install Ionic.
mypc#mypc-HP-ProBook-470-G2:~$ sudo npm install -g ionic
npm http GET https://registry.npmjs.org/ionic
npm http 200 https://registry.npmjs.org/ionic
npm http GET https://registry.npmjs.org/ionic/-/ionic-1.7.14.tgz
npm http 200 https://registry.npmjs.org/ionic/-/ionic-1.7.14.tgz
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic
npm WARN unmet dependency /usr/local/lib/node_modules/ionic/node_modules/connect/node_modules/finalhandler requires debug#'1.0.4' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/local/lib/node_modules/ionic/node_modules/request/node_modules/form-data requires combined-stream#'~0.0.4' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
ionic#1.7.14 /usr/local/lib/node_modules/ionic
Can someone help me to solve it, please ?
Thanks.
To answer your question, it;s the npm and nodejs version which is wrong.
(At least it was in my case)
I believe this has to do with the later added feature of scoped packages.
Update to a later version of node, I am not sure, if you are on ubuntu specifically or not, but for this purpose I was using ubuntu 14.x.
Remove all nodejs installs you might currently have :
sudo apt-get remove --purge nodejs
then you want to install node through the NVM package
You can search for a version you want via :
nvm ls-remote
For the ionic install I updated to : v0.12.10
nvm install 0.12.10
After this installs (It's also going to install/update npm for you)
You should see your latest version :
node -v
Should display : v.0.12.10 in this case.
You may then continue to install the ionic framework as instructed .
npm install -g ionic
Note: NVM also allows you to have concurrent installs of different node versions. Very handy for some legacy apps // services.

Resources