ripe-tech / ripe-sdk

The public Javascript SDK for RIPE Core
https://www.platforme.com
Apache License 2.0
8 stars 4 forks source link

fix: explicitly add eslint-plugin-mocha dependency #322

Closed BeeMargarida closed 3 years ago

BeeMargarida commented 3 years ago
- -
Issue CI is failing (https://github.com/ripe-tech/ripe-sdk/runs/3937347918) due to a npm@^8 bug (https://github.com/npm/cli/issues/3881), where there is inconsistencies in the install behaviour. This does not happen in previous versions and can be replicated locally only with npm@^8 installed.
Dependencies --
Decisions - Explicitly add eslint-plugin-mocha dependency.
Animated GIF --
ripe-tobias-bot[bot] commented 3 years ago

Woof, Woof!

Thank you for submitting the "fix: explicitly add eslint-plugin-mocha dependency" pull request 😎.

Please do not forget to review our internal guidelines:

Engaging in the development process in the best possible way helps it being efficient and fast.

Your friend, Tobias (Platforme's mascot)

Tobias Bot
joamag commented 3 years ago

@BeeMargarida this is weird can we talk a bit about this? Just to clarify the inconsistent behavior between npm>=8 and the other versions

BeeMargarida commented 3 years ago

@BeeMargarida this is weird can we talk a bit about this? Just to clarify the inconsistent behavior between npm>=8 and the other versions

There were some changes in the way npm now deals with the install process (not in version 8 but before in recent versions of npm7 - https://github.com/npm/cli/issues/2339, https://github.com/npm/cli/issues/2339#issuecomment-817013188) (still trying to pin-point what), but basically the problem is the node_modules result regarding dependencies of dependencies:

npm@7.7.6 npm@8.1.0
image image

In the latest version, the eslint-plugin-mocha is inside the eslint-config-hive dependency and not accessible. One thing that could possible work is defined eslint-plugin-mocha and eslint-plugin-vue as peerDependencies of eslint-config-hive (not tested, just a possible fix). All the other dependencies of eslint-config-hive that are outside its node_modules are peerDependencies of other packages. Other possibility is running npm i --legacy-peer-deps.

joamag commented 3 years ago

One thing that could possible work is defined eslint-plugin-mocha and eslint-plugin-vue as peerDependencies of eslint-config-hive (not tested, just a possible fix). All the other dependencies of eslint-config-hive that are outside its node_modules are peerDependencies of other packages.

Yeah let's schedule 15 min to talk about this one.