node.jssandstorm.io

ENOENT: no such file or directory, uv_os_homedir


I'm trying to use npm start to start a sandstorm app with vagrant-spk on a Windows 7 machine. I can do it by vagrant-spk vm ssh then npm start, but when I try vagrant-spk dev, it crashes with:

/usr/lib/node_modules/npm/node_modules/update-notifier/node_modules/xdg-basedir/index.js:5
const home = os.homedir();
                ^

Error: ENOENT: no such file or directory, uv_os_homedir
    at Object. (/usr/lib/node_modules/npm/node_modules/update-notifier/node_modules/xdg-basedir/index.js:5:17)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at lazy (/usr/lib/node_modules/npm/node_modules/update-notifier/node_modules/lazy-req/index.js:2:51)
    at /usr/lib/node_modules/npm/node_modules/update-notifier/node_modules/lazy-req/index.js:10:11

Does anyone have any idea? Thanks!


Solution

  • It was the HOME not set problem for Sandstorm. Use the same solution with Python will work: https://docs.sandstorm.io/en/latest/developing/raw-python/