Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Dependency "@material-ui/icons": "^4.x" is missing in package.json #22

Closed
Xenon-s opened this issue May 27, 2021 · 6 comments
Closed

Dependency "@material-ui/icons": "^4.x" is missing in package.json #22

Xenon-s opened this issue May 27, 2021 · 6 comments

Comments

@Xenon-s
Copy link

Xenon-s commented May 27, 2021

Dependency "@material-ui/icons": "^4.x" is missing in package.json

×  ....\node_modules\@iobroker\adapter-react\GenericApp.js:22:44: Cannot resolve dependency '@material-ui/icons/Close'
  20 | var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
  21 |
> 22 | var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
     |                                            ^
  23 |
  24 | var _Prompt = _interopRequireDefault(require("./Prompt"));
  25 |

@UncleSamSwiss @AlCalzone

@oweitman
Copy link

oweitman commented Sep 3, 2021

did i left anything?
freshly created adapter.
same result also with npm run:build:parcel
should i install the dependency by myself?

root@iobrokerdev:/opt/iobroker/ioBroker.ovarious# npm run watch:parcel

> iobroker.ovarious@0.0.1 watch:parcel /opt/iobroker/ioBroker.ovarious
> parcel admin/src/index.jsx -d admin/build

Server running at http://localhost:1234 
🚨  /opt/iobroker/ioBroker.ovarious/node_modules/@iobroker/adapter-react/GenericApp.js:22:44: Cannot resolve dependency '@material-ui/icons/Close'
  20 | var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
  21 |
> 22 | var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
     |                                            ^
  23 |
  24 | var _Prompt = _interopRequireDefault(require("./Prompt"));

@UncleSamSwiss
Copy link
Contributor

@AlCalzone I guess, he needs to wait for the next release of create-adapter?

@AlCalzone
Copy link
Contributor

@oweitman are you using the latest version of adapter-react?

@oweitman
Copy link

oweitman commented Sep 7, 2021

I think. Last week I started the create Adapter Skript with the npx command
The fix above is from may.

@AlCalzone
Copy link
Contributor

If you didn't update it, probably not. Run this inside your adapter directory

npm i -D @iobroker/adapter-react@latest

and try again.

We pin this dependency to a specific version in create-adapter because there were many problems where updates broke the generated adapters.

If your test works, we can update it in the creator.

@oweitman
Copy link

oweitman commented Sep 7, 2021

i already added the icons dependency on adapter level.
now the build is working.
now i look for a solution for the watch command, because
i use a docker container on a remote machine (not wsl on windows)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants