enricostara / telegram-mt-node

Telegram MTProto library (javascript, node.js)
MIT License
77 stars 25 forks source link

ERROR when I run 'sudo npm i telegram-mt-node' #20

Open abel672 opened 6 years ago

abel672 commented 6 years ago

I am trying to install the telegram-mt-node library in my projects to use it with telegram-js library of npm. When I run the command, this error appears:

npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master https://github.com/enricostara/node-cryptojs-aes.git /Users/abelmescua/.npm/_cacache/tmp/git-clone-63d36f2f
npm ERR! /Users/abelmescua/.npm/_cacache/tmp/git-clone-63d36f2f/.git: Permission denied
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/abelmescua/.npm/_logs/2018-04-26T12_15_29_293Z-debug.log

Is it something related with permissions in the git repo?. Something had same issue?

abel672 commented 6 years ago

This issue was solved in the next way!

-Create a use account in npm. -In you terminal run npm login -Login with your npm created account (user, password, email) -After that a message of confirmation appears -Run npm whoami to be sure that you are loggedin -Once you checked, just run the command again sudo npm i telegram-mt-node -Package should be installed without errors.

Tutorial to follow previous process in npm docs