Installation Issues with terminusdb-client-js

On CentOS 7:
npm install --save @terminusdb/terminusdb-client
npm WARN saveError ENOENT: no such file or directory, open ‘/home/rrivas/GIT/package.json’
npm WARN enoent ENOENT: no such file or directory, open ‘/home/rrivas/GIT/package.json’
npm WARN GIT No description
npm WARN GIT No repository field.
npm WARN GIT No README data
npm WARN GIT No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

  • @terminusdb/terminusdb-client@4.0.0
    updated 1 package and audited 1197 packages in 2.783s

62 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

Is this a good status?
What’s next to get a javascript API working?

Ron

Yes, we are working up to clean up warnings from dependencies, etc, but that is correct.

Maybe this will help: https://dmytri.dev/terminusdb-todoapp/

Thanks.
I am trying to standup the JS API on CentOS 7. Should I be using CentOS 8?
Ron

TerminusDB is running. Here is the npm outputs. (I believe something is still not correct)

[root@orioncri GIT]# npm install && npm run initdb
npm WARN saveError ENOENT: no such file or directory, open ‘/home/rrivas/GIT/package.json’
npm WARN enoent ENOENT: no such file or directory, open ‘/home/rrivas/GIT/package.json’
npm WARN GIT No description
npm WARN GIT No repository field.
npm WARN GIT No README data
npm WARN GIT No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

audited 1197 packages in 3.032s

62 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/rrivas/GIT/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open ‘/home/rrivas/GIT/package.json’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-11-02T23_19_16_542Z-debug.log
[root@orioncri GIT]#

What is suppose to be in the package.json file?

[…]

“dependencies”: {
@terminusdb/terminusdb-client”: “^3.0.6”
}

[…]

for example

If you want to use the todomvc example, you need to clone the repo firt, so that package.json and the other files are there, for example

git clone https://github.com/dmytri/terminusdb-todoappthen
cd terminusdb-todoappthen
npm install && npm run initdb

of course, you need to have terminusdb running for this to work, so download it here: https://terminusdb.com/hub/download

If you let me know more about what you are trying to do, I’ll be happy to help, perhaps come over to our discord server and we can chat tomorrow?

I do not have access to that repository

I did get the example to run. Now I need to figure out what you did and how to recreate with my database and app.
Thanks

1 Like

Excellent @orioncri - would be great to hear how it goes!

Great, join is in discord, we’d be happy to help

dmytri, Do you have a Python example repo as well that I could test?

Hey @orioncri, sorry I missed this question. I’m working on a Python one here:

Still a work in progress, will be adding documentation similar to the JavaScript example

It uses Poetry, so you need to have that installed:

The, clone the repo, cd in to it and do:

poetry run start

Now you will be able to access the swagger interface here: https://127.0.0.01:8000/docs

You can find the example’s code in main.py

@luke I had to break this message into two because it wouldn’t let “new users” post more than two links in a message and I’d like to speak to the manager! Also, I had to edit this reply to add this, because I’m not allowed to have three replies! This is an outrage :rofl:

Update: Fixed, original reply edited and now complete :partying_face:

1 Like

Eeeekkkkk @dmytri! I have upped your trust level to an appropriate point. Not sure why it does that - some inbuilt function to prevent spam I suppose. Will investigate to see if we can make the basic trust higher until there are spammers to worry about!

1 Like