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

Error: Cannot find module './Arc' when upgrading to v1.1.2 or v1.1.3 #4

Closed
gaurav opened this issue Apr 26, 2023 · 2 comments
Closed

Comments

@gaurav
Copy link

gaurav commented Apr 26, 2023

Hi there! I don't have a ton of experience with CommonJS and ES6 differences, so I might be doing something dumb here. Until newick-js v1.1.1, I can load the parse() function from newick-js from within my CommonJS program by using:

const parseNewick = require('newick-js').parse;

If I try doing this with newick-js v1.1.2 or v1.1.3, I get the following error:

Error: Cannot find module './Arc'
Require stack:
- /Users/gaurav/Development/phyloref/phyx.js/node_modules/newick-js/dist/index.js
- /Users/gaurav/Development/phyloref/phyx.js/src/wrappers/PhylogenyWrapper.js
- /Users/gaurav/Development/phyloref/phyx.js/src/index.js
- /Users/gaurav/Development/phyloref/phyx.js/test/citations.js
- /Users/gaurav/Development/phyloref/phyx.js/node_modules/mocha/lib/mocha.js
- /Users/gaurav/Development/phyloref/phyx.js/node_modules/mocha/index.js
- /Users/gaurav/Development/phyloref/phyx.js/node_modules/mocha/bin/_mocha

As far as I can tell, this is because in the earlier versions, there were additional files alongside the index.js file in node_modules/newick-js/dist:

❯ ls node_modules/newick-js/dist/
index.d.ts index.js   src

However, in these later versions, these files are missing:

❯ ls node_modules/newick-js/dist/
index.js

Is this deliberate? Is there some other way I can use require() to get access to the parse() function from within my CommonJS code (phyloref/phyx.js#127)? Any help would be hugely appreciated!

gaurav added a commit to phyloref/phyx.js that referenced this issue May 7, 2023
This PR adds curator information to the Phyx file as "contributors" with ORCIDs and names as described in #119 (comment). Closes #119.

I've also added a `.java-version` file to indicate that Java 15 should be used to run JPhyloRef, and pinned newick-js to v1.1.1 to avoid a bug (keesey/newick-js#4).
gaurav added a commit to phyloref/klados that referenced this issue Jun 18, 2023
gaurav added a commit to phyloref/klados that referenced this issue Jun 18, 2023
@keesey
Copy link
Owner

keesey commented Jun 20, 2023

Sorry for the delay, I missed this report initially. I use TypeScript, so I haven't seen this -- looking into it....

@keesey
Copy link
Owner

keesey commented Jun 20, 2023

Actually, wow, it was an error that would have occurred in TypeScript as well! I think I need to yank some builds. Install 1.2.1 -- that should do it.

gaurav added a commit to phyloref/klados that referenced this issue Jul 5, 2023
gaurav added a commit to phyloref/klados that referenced this issue Jul 5, 2023
gaurav added a commit to phyloref/klados that referenced this issue Jul 5, 2023
gaurav added a commit to phyloref/klados that referenced this issue Jul 5, 2023
gaurav added a commit to phyloref/phyx.js that referenced this issue Aug 2, 2023
@keesey keesey closed this as completed Feb 4, 2024
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