React Starter Kit reports unexplained missing packages

Let me start by stating that I'm new to React / JS rank, but far from the newcomer in general; my experience is diverse and includes, among other things, some work with Angular / JS. Therefore, this is not my first impact on the Node / JS ecosystem.

The current investigation began with a missing peer report that I received when I installed the Material_UI package in the directory in which I just installed the React launch kit, which gave the next report.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...


> uglifyjs-webpack-plugin@0.4.6 postinstall F:\Praesidium\Armatus_Admin_EventRegistration\React\material_ui_table_demo\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js

+ react-scripts@1.1.2
+ react@16.3.0
+ react-dom@16.3.0
added 1327 packages in 86.861s

Success! Created material_ui_table_demo at F:\Praesidium\Armatus_Admin_EventRegistration\React\material_ui_table_demo
Inside that directory, you can run several commands: ...

Setting Material_UI triggered the following report.

npm install material-ui@next

> jss@9.8.1 postinstall F:\Praesidium\Armatus_Admin_EventRegistration\React\material_ui_table_demo\node_modules\jss
> node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/jss/donate\u001b[0m')"

Love JSS? You can now support us on open collective:
 > https://opencollective.com/jss/donate
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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ material-ui@1.0.0-beta.40
added 47 packages in 23.878s

After learning the AJV package, I decided to create a dependency tree from the starter kit. The dependency tree reported one peer dependency in the above AJV package, which was not sent by the installer.

, , , npm.

material_ui_table_demo_Packages_Skeleton_20180402_211705.TXT - npm list, React Starter Kit.

material_ui_table_demo_Packages_Skeleton_20180402_211705_STDOUT.TXT - , .

, , Microsoft Windows 10 Professional NPM Node 5.6.0 v8.10.0 .

React Starter Kit , . , , , npm?

+4
1

npm install .

npm install , (, ) , :

  • node_modules
  • package-lock.json
  • package.json ( ajv@^6.0.0)
  • npm update ( )
  • npm install

pm ERR! peer dep missing: ajv@^6.0.0, required by ajv-keywords@3.1.0 !

: :

  ...
  "dependencies": {
    "ajv": "^6.0.0",
    ...

? npm ( - , , , - )

+1

Source: https://habr.com/ru/post/1695678/


All Articles