tsd
tsd copied to clipboard
Path must be a string. Received undefined
So I want to rebuild my app on the server on every git push.
When running a simple script which is just executing cd /.../ && tsd install
it works fine. But in my script it's just failing and I have no idea why after some time troubleshooting it. I would be glad If you could look over it.
My server side script (yeah I know it's a bit rough, running as root to restart a service, but it's just a development prototype) looks like this
#! /bin/bash
hash=$1
dst=/var/www/xxx/builds
app=/var/www/xxx/app
log=/var/www/pushhook/logs/"$hash".log
npm=/usr/bin/npm
tsd=/usr/bin/tsd
bower=/usr/bin/bower
gulp=/usr/bin/gulp
/usr/bin/git clone --depth 1 git@zzz/xxx.git $hash &>>$log
mv $hash $dst/
cd $dst/$hash
cd src
$npm install &>>$log
cd backend
$tsd install &>>$log
$npm install &>>$log
cd ..
cd crawler
$npm install &>>$log
cd ..
cd frontend
$bower install --allow-root &>>$log
cd ..
$gulp build &>>$log
rm $app
ln -s $dst/$hash/src/bin/www.js $app
chown -R www:www /var/www/xxx/
chmod 700 $app
service xxx restart
Error log
[ERR!] cwd : /var/www/xxx/builds/eca8ef7/src/backend
[ERR!] os : Linux 3.18.9-x86_64-jb1
[ERR!] argv : "/usr/bin/nodejs" "/usr/bin/tsd" "install"
[ERR!] node : v4.2.2
[ERR!] tsd : 0.6.5
[ERR!] Error: Path must be a string. Received undefined
[ERR!] CODE : undefined
[ERR!] Path must be a string. Received undefined
[ERR!] If you need help, you may report this error at:
https://github.com/DefinitelyTyped/tsd/issues
[ERR!]
TypeError: Path must be a string. Received undefined
at assertPath (path.js:8:11)
at Object.posix.resolve (path.js:426:5)
at new Context (/usr/lib/node_modules/tsd/build/tsd/context/Context.js:19:33)
at getContext (/usr/lib/node_modules/tsd/build/tsd/CLI.js:65:23)
at /usr/lib/node_modules/tsd/build/tsd/CLI.js:85:20
at tryCatch1 (/usr/lib/node_modules/tsd/node_modules/bluebird/js/main/util.js:63:19)
at Promise$_callHandler [as _callHandler] (/usr/lib/node_modules/tsd/node_modules/bluebird/js/main/promise.js:695:13)
at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/usr/lib/node_modules/tsd/node_modules/bluebird/js/main/promise.js:711:18)
at Promise$_settlePromiseAt [as _settlePromiseAt] (/usr/lib/node_modules/tsd/node_modules/bluebird/js/main/promise.js:868:14)
at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (/usr/lib/node_modules/tsd/node_modules/bluebird/js/main/async.js:74:12)
[ERR!] tsd.json: {"version":"v4","repo":"borisyankov/DefinitelyTyped","ref":"master","path":"typings","bundle":"typings/tsd.d.ts","installed":{"mime/mime.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"express/express.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"serve-static/serve-static.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"morgan/morgan.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"moment/moment.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"node/node.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"mongoose/mongoose.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"moment/moment-node.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"express-handlebars/express-handlebars.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"body-parser/body-parser.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"bluebird/bluebird.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"},"es6-promise/es6-promise.d.ts":{"commit":"16134c168d021351acb1673ee9659644fc58c424"}}}
[ERR!] .tsdrc could not be retrieved
[ERR!] Please include the following file with any support request:
/var/www/xxx/builds/eca8ef7/src/backend/tsd-debug.log
Hi,
I have recently starting getting the same error when running tsd via gulp:
TypeError: Path must be a string. Received undefined
at assertPath (path.js:8:11)
at Object.win32.resolve (path.js:130:5)
at Function.Paths.getUserCacheDir (C:\Documents and Settings\build.jenkins\jobs\VOSS-Newtec\workspace\newtec-web-ajs\node_modules\tsd\build\tsd\context\Paths.js:20:21)
at new Context (C:\Documents and Settings\build.jenkins\jobs\VOSS-Newtec\workspace\newtec-web-ajs\node_modules\tsd\build\tsd\context\Context.js:26:37)
at new getAPI (C:\Documents and Settings\build.jenkins\jobs\VOSS-Newtec\workspace\newtec-web-ajs\node_modules\tsd\build\api.js:18:20)
at Object.