NEM SDK Discussion

Welcome to the thread about the NEM SDK. Here you can discuss everything about the NEM SDK and potential problems that you might stumble upon.

2 Likes

What is the difference between SDK and API in general terms? :baby_chick:

Good question. They are sometimes mixed up.

API stands for Application Programming Interface and is only an interface that let’s different software communicate with each other.

SDK stands for Software Development Kit and usually bigger and contains more development tools than only an API does. In many instances, an SDK contains an API plus a bunch of other tools that are needed when developing software for a specific platform or use case.

I hope this quick explanation was of help to you. Otherwise let me know and I can explain in more detail.

5 Likes

I have a problem with instaling SDK library. In the tutorial min 2:10 it doesn;t work for me “ls package.json”
This command is not accepted .

Please Help

I got this error message after lauching main.js in the terminal

{ code: -1,
data: Error: Invalid URI “:7890/chain/last-block”
at Request.init (/Users/goslow/Documents/Github/nem/firstnemproject/node_modules/request/request.js:276:31)
at new Request (/Users/goslow/Documents/Github/nem/firstnemproject/node_modules/request/request.js:130:8)
at request (/Users/goslow/Documents/Github/nem/firstnemproject/node_modules/request/index.js:54:10)
at /Users/goslow/Documents/Github/nem/firstnemproject/node_modules/nem-sdk/build/com/requests/send.js:26:25
at new Promise ()
at send (/Users/goslow/Documents/Github/nem/firstnemproject/node_modules/nem-sdk/build/com/requests/send.js:25:9)
at Object.lastBlock (/Users/goslow/Documents/Github/nem/firstnemproject/node_modules/nem-sdk/build/com/requests/chain.js:42:30)
at Object. (/Users/goslow/Documents/Github/nem/firstnemproject/main.js:5:24)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10) }

I have got the same, It is because I think library is not installed but I don’t know how to do that.

which library are you talking about ?

Watch 2:10 in tutorial. I am not programmer, rather begginner . I have the same problem and I don’t know how to solve it. Let me know if You find any solution

When I tape the command: npm install nem-sdk it’s installed but I didn’t get the yellow msg as in the video. but it’s clearly install!
what’s your computer ? I got a mac os high sierra

Also when I type command npm init: contrary to the tuto I have the same files in firstnemproject (node_modules package.json ) + package-lock.json

Did you install it in the same directory where you have all of your project files?

npm init? If yes I install it after cd firstnemproject command and main.js is also in firstnemproject

I have try to update nem-sdk with command: npm install -g npm to update .But I get this

Try to run it with sudo first. So “sudo npm install -g npm”

But what I meant is that you need to run both the npm init and the npm install command in the directory where you have your main.js file.

still the same, and I have tried it from the begining reinstalling node.js also



I am still nowhere. Any ideas why it can’t find module ‘nem-sdk’ ?

what do you have when you type the command : ls
in the file SDK-NEM

1 Like

“ls” is not recognized as an internal or external command

OMG I found a solution:) . My stupid ANTY -VIRUS program blocked instalation of SDK package. I have just turned of this program.

2 Likes

dir for windows (ls for mac or linux)