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

Installation failed in npm #25

Open
dr-haoliu opened this issue Sep 10, 2021 · 10 comments
Open

Installation failed in npm #25

dr-haoliu opened this issue Sep 10, 2021 · 10 comments

Comments

@dr-haoliu
Copy link

$ npm install level levelgraph levelgraph-n3 --save
Build failure.
Could anyone help?

I am using
npm -v
7.23.0
node -v
v16.9.0

Should I downgrade to npm 2.1.3 to make it work?

@mcollina
Copy link
Collaborator

no clue, I have not used this module in a long time. I think it would need significant work to make it viable again.

@finwo finwo reopened this Sep 12, 2021
@finwo
Copy link
Member

finwo commented Sep 12, 2021

@hl2659 Do you have logs of when it failed to install?

@finwo
Copy link
Member

finwo commented Sep 12, 2021

After updating the dependencies, it seems the n3 library has some issues (see traceback)

n3.getStream should convert a single triple into n3:
     Uncaught TypeError: Cannot read property 'equals' of undefined
      at N3Writer._writeQuad (node_modules/n3/lib/N3Writer.js:107:18)
      at N3Writer.addQuad (node_modules/n3/lib/N3Writer.js:248:36)
      at N3StreamWriter._transform (node_modules/n3/lib/N3StreamWriter.js:35:14)
      at N3StreamWriter.Transform._read (node_modules/readable-stream/lib/_stream_transform.js:177:10)
      at N3StreamWriter.Transform._write (node_modules/readable-stream/lib/_stream_transform.js:164:83)
      at doWrite (node_modules/readable-stream/lib/_stream_writable.js:409:139)
      at writeOrBuffer (node_modules/readable-stream/lib/_stream_writable.js:398:5)
      at N3StreamWriter.Writable.write (node_modules/readable-stream/lib/_stream_writable.js:307:11)
      at ReadStream.ondata (node_modules/readable-stream/lib/_stream_readable.js:681:20)
      at ReadStream.emit (node:events:394:28)
      at addChunk (node_modules/readable-stream/lib/_stream_readable.js:298:12)
      at readableAddChunk (node_modules/readable-stream/lib/_stream_readable.js:280:11)
      at ReadStream.Readable.push (node_modules/readable-stream/lib/_stream_readable.js:241:10)
      at node_modules/level-mem/node_modules/level-iterator-stream/index.js:33:12
      at node_modules/level-mem/node_modules/abstract-leveldown/abstract-iterator.js:33:14
      at node_modules/level-mem/node_modules/encoding-down/index.js:140:5
      at node_modules/level-mem/node_modules/memdown/node_modules/abstract-leveldown/abstract-iterator.js:33:14
      at Immediate.callNext (node_modules/level-mem/node_modules/memdown/memdown.js:112:5)
      at processImmediate (node:internal/timers:464:21)

@mcollina Is there a clear definition of what functions are implemented beyond the tests which I could use to re-build this library?

@dr-haoliu
Copy link
Author

@finwo Thanks a lot for getting on this. I attached the failure message from the console and the log file. Please let me know if anything else is needed.
npm install levelgraph-n3 failed.txt
2021-09-10T15_12_23_082Z-debug.log

@finwo
Copy link
Member

finwo commented Dec 6, 2021

@hl2659 I recently had a similar issue with a different library, being caused by one of the dependencies not being up-to-date enough to compile with node 16.

Are you able to try with an older version of node (through nvm or another manager) to see if that'll work on your machine?

@dr-haoliu
Copy link
Author

I also failed with the old version of node due to some incompatible issues, which I could not remember. I have to give up the use of this resources. Sorry guys.
I would appreciate and use it if someone could update this to more recent versions of Node if it is not too much trouble.
Thanks.

@finwo
Copy link
Member

finwo commented Dec 7, 2021

No worries, it took a long time to get a response, so finding a different solution or workaround is to be expected.

@finwo
Copy link
Member

finwo commented Dec 8, 2021

@mcollina Would you be opposed to me rewriting this module from scratch, keeping the unit tests?

There seem to be issues with how the streams in combination with the n3 library work, so a fresh write with the same api would be the easiest way to fix this.

@mcollina
Copy link
Collaborator

mcollina commented Dec 8, 2021

Sure

@mcollina
Copy link
Collaborator

mcollina commented Dec 8, 2021

Go for it!

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

3 participants