wujek_kane Posted June 10, 2016 Report Posted June 10, 2016 Hello,I have an issue with deploying application using Steam-user on my server. I had to change dataDirectory (same as module using Steam-user).If I run my app as www-data it works just fine. However I need it to run all the time, so I'm using Ajenti with supervisor (as www-data user).It throws an error: path.js:8 throw new TypeError('Path must be a string. Received ' + ^ TypeError: Path must be a string. Received undefined at assertPath (path.js:8:11) at Object.posix.join (path.js:479:5) at userData (/srv/APP_DIRECTORY/node_modules/steam-user/node_modules/ap$ at Object.AppDirectory._setTemplates (/srv/APP_DIRECTORY/node_modules/s$ at Object.AppDirectory (/srv/APP_DIRECTORY/node_modules/steam-user/node$ at new SteamUser (/srv/APP_DIRECTORY/node_modules/steam-user/index.js:6$ at Object.<anonymous> (/srv/APP_DIRECTORY/bot/index.js:16:14) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/srv/APP_DIRECTORY/routers/index.js:6:7) it refers to: var client = new SteamUser({ dataDirectory: "/srv/APP_DIRECTORY/bot" }); (also everything works ok when I remove bot module) The issue seems to be only when running script with supervisor. I really need to get it up and running, so big thanks in advance! Also BIG, BIG thanks to Dr. McKay for awesome set of tools to deal with this whole Steam madness! Quote
Dr. McKay Posted June 10, 2016 Report Posted June 10, 2016 Can you resize your terminal window so that your stack trace doesn't get cut off? Quote
wujek_kane Posted June 10, 2016 Author Report Posted June 10, 2016 Guess I'm not too good at copy-pasting ​ path.js:8 throw new TypeError('Path must be a string. Received ' + ^ TypeError: Path must be a string. Received undefined at assertPath (path.js:8:11) at Object.posix.join (path.js:479:5) at userData (/srv/APP_DIRECTORY/node_modules/steam-user/node_modules/appdirectory/lib/appdirectory.js:21:29) at Object.AppDirectory._setTemplates (/srv/APP_DIRECTORY/node_modules/steam-user/node_modules/appdirectory/lib/appdirectory.js:134:34) at Object.AppDirectory (/srv/APP_DIRECTORY/node_modules/steam-user/node_modules/appdirectory/lib/appdirectory.js:129:10) at new SteamUser (/srv/APP_DIRECTORY/node_modules/steam-user/index.js:62:15) at Object.<anonymous> (/srv/APP_DIRECTORY/bot/index.js:16:14) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/srv/APP_DIRECTORY/routers/index.js:6:7) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) path.js:8 throw new TypeError('Path must be a string. Received ' + ^ I had to replace directory name with APP_DIRECTORY since it contains domain name and it has to remain hidden before it's live, sorry! Quote
Dr. McKay Posted June 10, 2016 Report Posted June 10, 2016 (edited) What version of steam-user do you have? Edit: Okay, I found the problem. It's because you don't have a HOME environment variable. I'll push out a fix shortly. Edited June 10, 2016 by Dr. McKay Quote
wujek_kane Posted June 11, 2016 Author Report Posted June 11, 2016 3.6.1 it is. Thank you for quick answer! Quote
wujek_kane Posted June 11, 2016 Author Report Posted June 11, 2016 I just updated steam-user to 3.7.2 and it doesn't seem to make any difference regarding that bug :/ I've experimented with dataDirectory a bit, tried null as well. Does not seem to make any difference. path.js:8 throw new TypeError('Path must be a string. Received ' + ^ TypeError: Path must be a string. Received undefined at assertPath (path.js:8:11) at Object.posix.join (path.js:479:5) at userData (/srv/APP_DIR/node_modules/steam-user/node_modules/appdirectory/lib/appdirectory.js:21:29) at Object.AppDirectory._setTemplates (/srv/APP_DIR/node_modules/steam-user/node_modules/appdirectory/lib/appdirectory.js:134:34) at Object.AppDirectory (/srv/APP_DIR/node_modules/steam-user/node_modules/appdirectory/lib/appdirectory.js:129:10) at new SteamUser (/srv/APP_DIR/node_modules/steam-user/index.js:64:15) at Object.<anonymous> (/srv/APP_DIR/bot/index.js:16:14) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/srv/APP_DIR/routers/index.js:6:7) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) path.js:8 throw new TypeError('Path must be a string. Received ' + ^ Also, application entry point is index.js, and it includes "Bot" module in bot subdirectory. Require is however in routers/index.js.Does it matter? Quote
Dr. McKay Posted June 11, 2016 Report Posted June 11, 2016 Okay, I see where the real problem is now. Try 3.7.3. Quote
wujek_kane Posted June 11, 2016 Author Report Posted June 11, 2016 Had to revert dataDirectory to "/", but it works now!!!! Thank you Sir, you're my personal hero! I don't think, I'd ever managed to harness this Steam madness without your amazing tools.Two factor authorization, generating codes, inventory, trades, some general hints with Steam bull****... You got it all covered! Perhaps, the documentation needs a tiny *tiny* bit of love, to be 100% clear for noobs like me. Anyway, please let me know, if there's anything I could volunteer to do in order to support your AMAZING job. Also I'd like to know if you accept donations? I'd be honored to reward you for your help, when I'm done with this project. Quote
Dr. McKay Posted June 11, 2016 Report Posted June 11, 2016 What was confusing in the documentation? It would be massively helpful if you fixed whatever documentation confused you, after you figured it out, then sent a pull request. And I do accept donations, info is available at https://www.doctormckay.com/donate.php Quote
cookie Posted June 12, 2016 Report Posted June 12, 2016 What version of steam-user do you have? Edit: Okay, I found the problem. It's because you don't have a HOME environment variable. I'll push out a fix shortly. I even posted that bug long time ago and you told me to report to appdirectory github repo. smh Quote
Dr. McKay Posted June 12, 2016 Report Posted June 12, 2016 I mean, it's still appdirectory's fault. I was just able to work around it. Quote
IvanVodka Posted December 5, 2017 Report Posted December 5, 2017 (edited) Sorry for necroposting, but I have same issue with steam-tradeoffer-manager 2.9.2 (nodejs 8), when bots starts from rc.local path.js:28 throw new TypeError('Path must be a string. Received ' + inspect(path)); ^ TypeError: Path must be a string. Received undefined at assertPath (path.js:28:11) at Object.join (path.js:1251:7) at userData (/var/jc/node/bots_refactor/node_modules/appdirectory/lib/appdirectory.js:21:29) at AppDirectory._setTemplates (/var/jc/node/bots_refactor/node_modules/appdirectory/lib/appdirectory.js:134:34) at new AppDirectory (/var/jc/node/bots_refactor/node_modules/appdirectory/lib/appdirectory.js:129:10) at new TradeOfferManager (/var/jc/node/bots_refactor/node_modules/steam-tradeoffer-manager/lib/index.js:56:29) at new BotManager (/var/jc/node/bots_refactor/lib/BotManager.js:56:15) at start (/var/jc/node/bots_refactor/bot_start.js:38:24) at Object.<anonymous> (/var/jc/node/bots_refactor/starters/bot_3.js:2:40) at Module._compile (module.js:635:30) Edited December 5, 2017 by IvanVodka Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.