strapi icon indicating copy to clipboard operation
strapi copied to clipboard

Install fail: npm WARN [email protected] requires a peer of prop-types@^15.6.0 but none is installed. You must install peer dependencies yourself.

Open anhhai2810 opened this issue 7 years ago • 16 comments

Informations

  • Node.js version: v10.14.1
  • npm version: 6.4.1
  • Strapi version: [email protected]
  • Database: MySQL
  • Operating system: Windows

What is the current behavior?

$ npm install strapi@alpha -g npm WARN deprecated [email protected]: This version is no longer maintained. Please upg rade to the latest version. C:\Users\datlp6\AppData\Roaming\npm\strapi -> C:\Users\datlp6\AppData\Roaming\np m\node_modules\strapi\bin\strapi.js npm WARN [email protected] requires a peer of prop-types@^15.6.0 but none is instal led. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of react@^15.6.2 || ^16.0 but none is in stalled. You must install peer dependencies yourself.

Steps to reproduce the problem ⏳ Testing database connection... The app has been connected to the database successfully!

🏗 Application generation:

👌 Your new application videos is ready at D:\Strapi\videos.

⚡️ Change directory: $ cd videos

⚡️ Start application: $ strapi start

$ strapi start internal/modules/cjs/loader.js:582 throw err; ^

Error: Cannot find module 'lodash' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15) at Function.Module._load (internal/modules/cjs/loader.js:506:25) at Module.require (internal/modules/cjs/loader.js:636:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (D:\Strapi\videos\admin\controllers\Admin.js:5:11) at Module._compile (internal/modules/cjs/loader.js:688:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10) at Module.load (internal/modules/cjs/loader.js:598:32) at tryModuleLoad (internal/modules/cjs/loader.js:537:12) at Function.Module._load (internal/modules/cjs/loader.js:529:3) What is the expected behavior?

Suggested solutions

anhhai2810 avatar Dec 10 '18 04:12 anhhai2810

I actually have this error as well.

npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version. C:\Users\aurel\AppData\Roaming\npm\strapi -> C:\Users\aurel\AppData\Roaming\npm\node_modules\strapi\bin\strapi.js npm WARN [email protected] requires a peer of prop-types@^15.6.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of react@^15.6.2 || ^16.0 but none is installed. You must install peer dependencies yourself.

I can't even create a new project. The creation seems to crash when I am asked to choose the kind of DB I want. And it crashes no matter which DB type I select.

Help wanted here as well.


Edit : I gave it a try on my personal comp as well, manage to go one step further (asked for database name) and got stuck right after it as well.

aurelienbobenrieth avatar Dec 17 '18 14:12 aurelienbobenrieth

Little up right there !

Any solutions anyone ? I am not managing to do any proper installation no matter on which comp I try (each one running on Windows).

aurelienbobenrieth avatar Dec 24 '18 17:12 aurelienbobenrieth

Did you check this part of the wiki. Maybe can help https://github.com/strapi/strapi/wiki/Frequently-Asked-Questions#windows

lauriejim avatar Dec 26 '18 17:12 lauriejim

hello.I first use strapi.I report an error when I install strapi with the statement "npm install strapi@alpha -g".It display ‘npm WARN deprecated [email protected]: This version is no longer maintained. I still can't understand the solution you mentioned above.Please upgrade to the latest version.Can you tell me in detail how to solve this problem. ’

DengZhanyong avatar Dec 27 '18 13:12 DengZhanyong

There are apparently no proper solutions to our problems. The only work-around seems to use a Linux distros (even though I did not have the time to try it yet).

aurelienbobenrieth avatar Dec 27 '18 14:12 aurelienbobenrieth

@CTBUdzy Windows isn't support meaning no support is provided for it here. Your welcome to look into it, but right now it isn't a priority for the Strapi team. You will need to use WSL (Windows Subsystem Linux) or a linux virtual machine. (Google WSL, lots of helpful guides)

But yes @aurelienbobenrieth not right now, eventually but considering 99.99% of users will be hosting on linux, the development environment reflects that.

derrickmehaffy avatar Dec 27 '18 19:12 derrickmehaffy

On Windows I've same issue when I'm installing with npm install strapi -g

No issue with npm install strapi@alpha -g

https://strapi.io/documentation/3.x.x/getting-started/installation.html#setup

stact avatar Dec 28 '18 11:12 stact

@stact Windows isn't supported, see my previous comment

derrickmehaffy avatar Dec 28 '18 11:12 derrickmehaffy

When you install with npm install strapi -g you are installing Strapi-v1 which is no longer maintained.

derrickmehaffy avatar Dec 28 '18 11:12 derrickmehaffy

Having this problem on Ubuntu also, double checked my versions on all these packages I tried to install peer dependencies myself as WARN'ed. This output is from a non global attempt but I tried global install as well.

dreadpirate007@0:/var/www/html/ShopifyApp$ npm show joi version 14.3.1 dreadpirate007@0:/var/www/html/ShopifyApp$ npm show react-ga version 2.5.6 dreadpirate007@0:/var/www/html/ShopifyApp$ npm show prop-types version 15.6.2 dreadpirate007@0:/var/www/html/ShopifyApp$ npm show react version 16.7.0 dreadpirate007@0:/var/www/html/ShopifyApp$ sudo npm install strapi@alpha npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version. npm WARN [email protected] requires a peer of prop-types@^15.6.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of react@^15.6.2 || ^16.0 but none is installed. You must install peer dependencies yourself.

tlchatt avatar Jan 07 '19 16:01 tlchatt

I'll add to that topic that the use of WSL is not really optimal since you won't be able to use MongoDB as it is not yet supported yet in WSL.

aurelienbobenrieth avatar Jan 09 '19 11:01 aurelienbobenrieth

I get the same warnings on macOS and Unbutu 18.x

Is there a fix for this issue?

justinriggio avatar Jan 14 '19 20:01 justinriggio

I believe accidentally running the npm install command as sudo was what caused this issue for me in Ubuntu and uninstall and reinstall without sudo fixed it.

tlchatt avatar Jan 14 '19 22:01 tlchatt

@tlchatt What node and npm ver are you running on Ubuntu? and did you use apt or NVM?

justinriggio avatar Jan 14 '19 23:01 justinriggio

Ubuntu 18.04.1 LTS, node --v11.6.0 npm 6.5.0-next.0 Not sure about that last question.

tlchatt avatar Jan 31 '19 20:01 tlchatt

WelThe prop-types dependency is installed in the strapi-helper-plugin package which the admin has in its dependencies like React and so on. So I sure that the installation failed because you are on a Windows. @lauriejim and @Aurelsicoko fixed the installation on Windows.

@lauriejim I'll let you close the issue if you feel like so, I'm convinced that React-ga is not the primary cause of a failed install.

soupette avatar Mar 01 '19 11:03 soupette