lmammino / godaddy-dns

A Node.js script to programmatically update GoDaddy DNS records
https://lmammino.github.io/godaddy-dns/
MIT License
78 stars 21 forks source link

Error related to "request" library prevents use #25

Closed Joncom closed 6 years ago

Joncom commented 6 years ago
$ node --version
v9.2.1

$ sudo npm install godaddy-dns -g
/usr/local/bin/godaddy-dns -> /usr/local/lib/node_modules/godaddy-dns/src/cli.js
+ godaddy-dns@1.2.0
updated 1 package in 6.052s

$ godaddy-dns -v

###
### The "request" library is not installed automatically anymore.
### But required by "request-promise".
###
### npm install request --save
###

/usr/local/lib/node_modules/godaddy-dns/node_modules/aws4/lru.js:1
(function (exports, require, module, __filename, __dirname) {

SyntaxError: Invalid or unexpected token
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:152:10)
    at Module._compile (module.js:605:28)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/godaddy-dns/node_modules/aws4/aws4.js:5:11)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/godaddy-dns/node_modules/request/request.js:11:12)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
Joncom commented 6 years ago

Nevermind. Seems that installing npm packages globally while using n to manage NodeJS installations is a somewhat sketchy prospect. Managed to get everything working fine by installing to a specific folder (not globally), and executing godaddy-dns directly from there.

lmammino commented 6 years ago

Hello @Joncom, thanks for reporting the issue anyway, I'll try to check if I can replicate the bug and see if there's something I can do to avoid the issue with that specific setup.

Anyway, you might also be interested in knowing that in the latest releases you can download binaries that should just work in your OS without even having to worry about Node.js and dependencies.

Let me know if you have further issues.

papajo commented 6 years ago

I just ran into this issue. It worked fine during first few trial test runs then it started puking these errors..whatever.