Help with init (moved)

Hi @berlin, I’m moving your question here so our devs can help you out!

i am experiencing problem with discovery init with ubuntu 18.04.
might this related to node version?

module.exports = function (str) { return str.replace(r, ‘’); };
TypeError: Cannot read property ‘replace’ of undefined
at module.exports (/home/berlion/.nvm/versions/node/v10.13.0/lib/node_modules/@enigmampc/discovery-cli/node_modules/cli-color/trim.js:8:46)
at Line.column (/home/berlion/.nvm/versions/node/v10.13.0/lib/node_modules/@enigmampc/discovery-cli/node_modules/clui/lib/clui.js:293:23)
at /home/berlion/.nvm/versions/node/v10.13.0/lib/node_modules/@enigmampc/discovery-cli/src/docker.js:45:14
at Array.forEach ()
at (/home/berlion/.nvm/versions/node/v10.13.0/lib/node_modules/@enigmampc/discovery-cli/src/docker.js:10:30)
at IncomingMessage.emit (events.js:182:13)
at IncomingMessage.EventEmitter.emit (domain.js:442:20)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at IncomingMessage.Readable.push (_stream_readable.js:219:10)
at HTTPParser.parserOnBody (_http_common.js:122:22)
at Socket.socketOnData (_http_client.js:441:20)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:442:20)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

hi @berlin, can you tell which node version you’re running?
I used nvm to manage npm/node version, it’ll be better.
Before using nvm, I manually installed npm & node, it caused so many troubles.

Hope this help.

10.13 the version info is in the path of the error message posted.

i am using nvm to manage node version too.

hi @berlin, I think you can go Discordapp via this invitation link to interact directly with their devs.

1 Like

Hey @adi could you check this out when you have a moment? @berlin – can you verify that this hasn’t been resolved yet? (and if it was, could you let us know how you fixed it?)

@ainsley i have not gotten response yet. might be related to node version. what version of node that you recommend? we are on 10.15.3.

hi @berlin, i’m on node v10.16.0 - the stable one and I also use nvm to set default node version.

No problem with that when I’m running on ubuntu 16.04.

Hope this help.

The latest versions of Node 10 and 11 should work fine. We recently updated our NodeJS repos from the latest 10 to the latest 11, and everything has been working fine for us on both.

Hey @berlin – was this resolved? I noticed you also had posted an issue with discovery test recently. Thanks for your patience as we try to figure this out.

Hi @ainsley,

I’m having the same problem here, either with latest Node 11 (11.15.0) or 10 (10.16.0).

Ubuntu 18.04 (Bionic LTS), latest NVM (0.34.0), zsh.

1 Like

Thanks for letting us know @guix.

@adi – can you take a look, and confirm which ubuntu version we’re supporting right now (or if it should matter)? I think the issue may be around Ubuntu version, though I am not sure why that would be at this time.

I don’t think the Ubuntu version should matter, nore the Node version since it’s working for @arookie with 10.16.0 and not for me.

In fact it might just be that I run out of disk space to pull the docker images, will let you know as soon as I make space :slight_smile:


OK, cool! Do let us know if that works. We’re trying to isolate more of the different types of bugs people encounter setting up environments, as it can be hard to replicate them…

Well I can already confirm I was indeed running out of space which can hardly be any good :smiley:

It should be OK as soon as I’ve finished moving my TV series on my bigger storage drive :blush:


yes. got this resolved. node version 10.16.0 works.


Great, thanks for the update @berlin. And if you’ve had the chance to find out yet, let us know if the storage was the issue for you @guix ! Thanks :slight_smile:

@ainsley Yes it works now. Sorry for the delay, I had to backup then resize my partitions ( Docker uses / so if you have /home on another partition, it’s / you must make space on).

1 Like

yes. it is. i couldn’t try it on my laptop. it took up too much space.

1 Like

I ran into this issue today too and it was indeed a space problem. I cleaned up my docker images using this post (really helpful), and afterward everything went smoothly:

1 Like