Closed shanekoss closed 3 years ago
I am also getting this error. +1
I've tested it in Node.js and it's working alright. Are you using it in Browser? 🤔
@MunifTanjim thanks so much for taking a look. I'm actually using it node.js as well.
OSX 10.15.3 Node 10.17.0
Let me know if anything you'd like to me to change or try here.
Cheers.
How is your project setup? 🤔 It shouldn't use index.umd.js
for Node.js. The umd
bundle is for Browser.
Here is my package.json:
{
"name": "blah",
"version": "1.0.15",
"description": "blah",
"main": "index.js",
"directories": {
"doc": "doc"
},
"scripts": {
"start": "node index.js",
"dev": "nodemon index.js",
"make_changelog": "node index.js"
},
"repository": {
"type": "git",
"url": "git@bitbucket.org:something.git"
},
"author": "",
"license": "ISC",
"devDependencies": {
"gitlog": "git+https://github.com/andidevi/node-gitlog.git",
"nodemon": "^2.0.4"
},
"nodemonConfig": {
"watch": [
"index.js"
],
"ext": "js",
"delay": "1"
},
"dependencies": {
"bitbucket": "^2.4.1",
"sync-request": "^6.1.0"
}
}
No other special settings that I can think of. And for simplicity in testing - the index.js is just as above - nothing else.
Thanks.
Hey @shanekoss , can you try doing:
bitbucket.repositories
.listGlobal({}) // pass empty object as params
does that solve your problem?
@MunifTanjim - thanks. doh! that was it.
Fixed the solution on my end too, thanks!
Can we update the README.md to reflect this? I think we all arrived here from copying parts of the code listed in there, it would help to stop people asking the same question
Thanks for this library - very useful!
Having an issue with basic authentication - have it set up like the documentation:
I get this error:
TypeError: Cannot read property 'headers' of undefined
from index.umd.js:15:464
Any ideas?
Same credentials are working with Postman.
Thanks!