Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ramda 0.28.0 regression in 10.0.4 (node 17) #322

Closed
higherorderfunctor opened this issue Apr 12, 2022 · 7 comments
Closed

ramda 0.28.0 regression in 10.0.4 (node 17) #322

higherorderfunctor opened this issue Apr 12, 2022 · 7 comments

Comments

@higherorderfunctor
Copy link

Plugin is failing to load in a monorepo with an esm module package in it's workspace. Had to rollback to 10.0.3. This may be on the ramda side looking at ramda/ramda#3241.

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Failed to load plugin 'mocha' declared in '.eslintrc.cjs » ../../.eslintrc.js': Package subpath './src/find' is not defined by "exports" in ./node_modules/ramda/package.json

./packages//.eslintrc.cjs

module.exports = {
  extends: ["../../.eslintrc.js"],
};

./eslintrc.js

module.exports = {
  env: {
    es2021: true,
  },
  extends: [
    "airbnb-base",
    "eslint:recommended",
    "plugin:prettier/recommended",
    "plugin:import/recommended",
    "plugin:promise/recommended",
    "plugin:mocha/recommended",
  ],
  plugins: ["prettier", "promise", "mocha"],
  rules: {
    camelcase: "warn",
    "mocha/no-mocha-arrows": "off",
    "no-underscore-dangle": "warn",
    "no-shadow": "off",
  },
};
@simlu
Copy link

simlu commented Apr 12, 2022

Running into the exact same issue here updating various packages. Something definitely broke

Edit: This only breaks for us running against node 17. We also test against node 14 and node 16 and it works fine there.

simlu pushed a commit to simlu/smart-fs that referenced this issue Apr 12, 2022
@gajus
Copy link

gajus commented Apr 12, 2022

Thanks for the hint about v17. It works well with v16. Must be npm version difference.

@lo1tuma
Copy link
Owner

lo1tuma commented Apr 13, 2022

So it seems to be indeed a problem with ramda itself. Unfortunately the update was necessary since the old version contained a vulnerability, see #320.

This comment suggested a workaround to add the .js suffix to all ramda imports. Could anyone confirm that this would fix the issue? If so I would happy to apply this workaround.

@higherorderfunctor
Copy link
Author

They merged a possible fix a couple hours ago to alter the exports: ramda/ramda#3270

Not sure when it will make it into a release though.

@danielduarte
Copy link

As a workaround until ramda devs release the new version with the fix (that is already merged), I've installed the package pointing to a specific commit and worked fine for me (in Node.js v17 and previous).

npm install --save-dev "git://github.com/ramda/ramda.git#50c6b57110b2f3631ed8633141f12012b7768d85"

It's not the best, but since we're using ramda as an indirect dependency, it solves the issue. And of course, it's temporary.

@simlu
Copy link

simlu commented May 23, 2022

@danielduarte Thanks for the update on this. We "solved" this by simply not updating to 10.0.4. Not ideal (we have dozens of repos and Devs keep forgetting to "downgrade" after an update 🤷‍♂️), but it works for now

@lo1tuma
Copy link
Owner

lo1tuma commented May 27, 2022

Fixed in version 10.0.5 by #326

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

No branches or pull requests

5 participants