ENOENT:没有这样的文件或目录,uv_os_homedir

ENOENT: no such file or directory, uv_os_homedir

我正在尝试使用 npm start 在 Windows 7 机器上通过 vagrant-spk 启动 sandstorm 应用程序。我可以通过 vagrant-spk vm ssh 然后 npm start 来完成,但是当我尝试 vagrant-spk dev 时,它崩溃了:

/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

有人知道吗?谢谢!

是Sandstorm的HOME没有设置的问题。使用与 Python 相同的解决方案将起作用:https://docs.sandstorm.io/en/latest/developing/raw-python/