Nodebb: Node锛歷8.1.2 "TypeError: "cwd" must be a string"

Created on 27 Jun 2017  路  6Comments  路  Source: NodeBB/NodeBB

[junbaor@archlinux NodeBB]$ uname -r
4.11.6-1-ARCH
[junbaor@archlinux NodeBB]$ node -v
v8.1.2
[junbaor@archlinux NodeBB]$ npm -v
4.6.1
[junbaor@archlinux NodeBB]$ ./nodebb start

Starting NodeBB
  "./nodebb stop" to stop the NodeBB server
  "./nodebb log" to view server output
  "./nodebb restart" to restart NodeBB

child_process.js:400
    throw new TypeError('"cwd" must be a string');
    ^

TypeError: "cwd" must be a string
    at normalizeSpawnArguments (child_process.js:400:11)
    at Object.exports.spawn (child_process.js:485:38)
    at Function.module.exports.daemon (/home/junbaor/Work/NodeBB/node_modules/daemon/index.js:50:31)
    at module.exports (/home/junbaor/Work/NodeBB/node_modules/daemon/index.js:25:20)
    at /home/junbaor/Work/NodeBB/loader.js:223:21
    at FSReqWrap.oncomplete (fs.js:135:15)
waiting for upstream

Most helpful comment

https://github.com/indexzero/daemon.node/issues/41

For anyone else affected, a quick workaround is to apply zipang's PR:

npm install 'github:zipang/daemon.node#48d0977c26fb3a6a44ae99aae3471b9d5a761085'

All 6 comments

https://github.com/indexzero/daemon.node/issues/41

For anyone else affected, a quick workaround is to apply zipang's PR:

npm install 'github:zipang/daemon.node#48d0977c26fb3a6a44ae99aae3471b9d5a761085'

Can confirm. It looks like daemon is unmaintained. We should drop daemon usage entirely.

@junbaor in the mean time, we do not test or support Node 8, so it's better to downgrade to Node v6 in the meantime.

Not a bug, will wait for upstream daemon to be updated and update our deps accordingly.

@julianlam Is there anything I can't see why you think upstream will deliver a fix?
The last upstream commit was on 28 May 2015, the last release was on 2 Apr 2013. I think it is reasonable to assume this project is abandoned.

This might help for a quick workaround, but I haven't checked if this can be applied here easily:
https://github.com/NicolaOrritos/probiotic/commit/4f9d2524a5ea7146d20c32b3471f16aa62229e8a

References:
https://www.npmjs.com/package/daemon
https://github.com/indexzero/daemon.node

If specifying a cwd is an acceptable workaround then that's fine. Let me give that a spin now.

Good enough for me :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tgmatt picture tgmatt  路  5Comments

tom-rade picture tom-rade  路  3Comments

djensen47 picture djensen47  路  5Comments

BenLubar picture BenLubar  路  3Comments

sandratatarevicova picture sandratatarevicova  路  3Comments