Adorkable / node-red-contrib-ui-led

A simple LED status indicator for the Node-RED Dashboard
MIT License
16 stars 12 forks source link

Incompatibility with node-red-dashboard v3 #86

Open jdotbdot opened 3 years ago

jdotbdot commented 3 years ago

Attempting via npm v7 to update node-red-dashboard from 2.30.0 to the current release 3.0.4 fails if node-red-contrib-ui-led is installed: npm ERR! code ERESOLVE npm ERR! While resolving: node-red-contrib-ui-led@0.4.9 npm ERR! Found: node-red-dashboard@3.0.4 npm ERR! node_modules/node-red-dashboard npm ERR! node-red-dashboard@"3.0.4" from the root project npm ERR! Could not resolve dependency: npm ERR! peer node-red-dashboard@"^2.23.3" from node-red-contrib-ui-led@0.4.9 npm ERR! node_modules/node-red-contrib-ui-led npm ERR! node-red-contrib-ui-led@"^0.4.9" from the root project

colinl commented 3 years ago

The problem is that with npm v7 the peer dependency on the dashboard ^2.23.3 specified in package.json is now treated as an error rather than a warning. A workaround is to install from the command line with the option --legacy-peer-deps which drops it back to being a warning. The fix is to remove the peer dependency or possibly to change it to requiring at least 2.23.3 rather than at least, but <v3.

yoiang commented 3 years ago

Sorry for the late reply, this should be fixed with the PR @EkiSkyten contributed, now merged with other updated dependencies! Let me know if this resolves the issue.

colinl commented 2 years ago

Unfortunately no, it hasn't fixed it. package.json still (in version 0.4.10) includes the lines

  "peerDependencies": {
    "node-red-dashboard": "^2.23.3"
  },

The PR fixes it in devDependencies but not in peerDependencies

colinl commented 2 years ago

For anyone finding this issue, the workaround till it is fixed is to install using npm install --legacy-peer-deps node-red-contrib-ui-led

yoiang commented 2 years ago

@colinl arg, I don't know how I missed that, fixed in 0.4.11!