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

Cannot find package highs-addon/package.json #44

Closed
quentinmassias opened this issue May 3, 2024 · 2 comments
Closed

Cannot find package highs-addon/package.json #44

quentinmassias opened this issue May 3, 2024 · 2 comments

Comments

@quentinmassias
Copy link

Hello, first, thanks for the library, got nice results from it !

We just met a problem during the installation of highs-solver.

In the highs-solver/lib/index.js, there is an import of highs-addon but this is error is thrown :

Cannot find package '/usr/app/node_modules/highs-addon/package.json

While digging into the problem, I saw that in your highs-addon/package.json, you have "main": "index.cjs". I can see that file on the GitHub repository, but it does not appear in the highs-addon node_modules files (installed as dependency of highs-solver).

If I copy the content of the index.cjs file of GitHub and create it by myself, the problem is gone.

The thing is, why the index.cjs file is not present in the node_modules/highs-addon files at install ?

I tried to play with CommonJS / ESM configuration of my own package.json / tsconfig.json thinking it could be the problem (because cjs file is CommonJS), ended up by using "type": "module" and "module": "esnext". I don't know if this information is useful.

Thanks in advance for your help !

@mtth
Copy link
Contributor

mtth commented May 4, 2024

Hi @quentinmassias. Could you try again after upgrading to 0.6.1? (Tentative fix: #45.)

@quentinmassias
Copy link
Author

Hi @mtth, it seems good now, thanks !

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

2 participants