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

npm mithril + ospec binary conflict #2794

Open
barneycarroll opened this issue Jul 8, 2022 · 3 comments
Open

npm mithril + ospec binary conflict #2794

barneycarroll opened this issue Jul 8, 2022 · 3 comments
Assignees
Labels
Area: Core For anything dealing with Mithril core itself Area: Workflow For anything dealing with Mithril's internal tooling, including the mocks and bundler, but not ospec Type: Bug For bugs and any other unexpected breakage

Comments

@barneycarroll
Copy link
Member

Following on from the discussion starting here in the chat.

Mithril's internal ospec is deprecated and console.warns to this effect on execution, recommending the canonical npm install of ospec. However, installing this as directed doesn't override Mithril's binary path binding for its internal ospec. From my tests, whichever is installed first, installing both mithril & ospec always results in the Mithril's ospec binding taking precedence; @orbitbot says he is able to get ospec to take precedence based on installation sequence, but I couldn't replicate.

The issue of conflicting binary path registrations in npm package dependencies has been raised at least a couple of times (npm#7130 & npm#9040) but the trail has run cold seemingly without resolution.

I've raised a discussion on the npm Github org feedback site – but maybe I ought to revive one of the issues above or file a new one?

In the meantime we might be able to advise a hack to account for the current deprecation warning's failure. 🤔

@barneycarroll barneycarroll added the Type: Bug For bugs and any other unexpected breakage label Jul 8, 2022
@orbitbot
Copy link
Member

orbitbot commented Jul 8, 2022

Even more alarmingly, I could not find an easy way to find the correct tests with the documented approach. We essentially end up in a situation where there all of a sudden appear false negatives based on our instructions, which implies that someone needs to be alert enough to roll back the local changes advertised as canonical.

@dead-claudia
Copy link
Member

As a short-term fix, we could instruct users to just add a postinstall step that simply copies the right binary into node_modules.

@gilbert
Copy link
Contributor

gilbert commented May 4, 2023

Just ran into this. Here's my package.json postinstall script solution:

  "scripts": {
    "postinstall": "ln -sf ../ospec/bin/ospec node_modules/.bin/ospec"
  },

fkleon added a commit to fkleon/child-growth-charts that referenced this issue Apr 30, 2024
@dead-claudia dead-claudia added Area: Core For anything dealing with Mithril core itself Area: Workflow For anything dealing with Mithril's internal tooling, including the mocks and bundler, but not ospec labels Sep 2, 2024
@dead-claudia dead-claudia self-assigned this Sep 2, 2024
@dead-claudia dead-claudia mentioned this issue Oct 13, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core For anything dealing with Mithril core itself Area: Workflow For anything dealing with Mithril's internal tooling, including the mocks and bundler, but not ospec Type: Bug For bugs and any other unexpected breakage
Projects
None yet
Development

No branches or pull requests

4 participants