Closed mrpeu closed 7 months ago
@mrpeu Did you have an existing install of Moddable on your system that was not set up by xs-dev, i.e manually by following the Moddable docs?
That step is looking for the xsbug-log directory within the Moddable repo on your system.
Can you running xs-dev info
and share the output?
I did indeed install Moddable manually. What conflicts does that create?
> xs-dev info
(node:92606) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
/Users/xxx/.nvm/versions/node/v21.6.0/lib/node_modules/xs-dev/node_modules/gluegun/build/index.js:14
throw up;
^
Error: Command failed: git tag -l --sort=-taggerdate
fatal: not a git repository (or any of the parent directories): .git
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at Socket.<anonymous> (node:internal/child_process:457:11)
at Socket.emit (node:events:519:28)
at Pipe.<anonymous> (node:net:337:12) {
code: 128,
killed: false,
signal: null,
cmd: 'git tag -l --sort=-taggerdate',
stdout: '',
stderr: 'fatal: not a git repository (or any of the parent directories): .git\n'
}
Node.js v21.6.0
@mrpeu That new error is coming from xs-dev trying to determine the Moddable SDK version on your system by looking at the git branch or tag (https://github.com/HipsterBrown/xs-dev/blob/main/src/toolbox/setup/moddable.ts#L43-L58) based on the assumption that the SDK is installed by cloning the repo. I'll add some error handling to make sure the xs-dev info
succeeds or provides better feedback than that stack trace.
How do you have the SDK installed?
Thank you @HipsterBrown
It must be installed in several different way tbh so it might be a mess if things reference each other with environment variables or default folder path.
I should cleanup everything and try again: from 0, only with xs-dev
.
I'll delete the moddable and esp folders I can find in the user folders, and check files such as ~/.bashrc
.
xs-dev
has been very helpful already, I understand that the magic dependencies it needs must be a mess to keep track of. Especially since the main goal of xs-dev
is precisely to "hide" all this complexity :)
I'll come back after I tried a clean reinstall.
I appreciate you understanding the complexity of juggling so much in a single CLI 😄. xs-dev tries to rely on the same environment variables as the Moddable SDK to ensure everything is set up for success when building programs for the various target devices, especially if the tools have been manually installed previously or while working on custom branches.
I've just published version 0.30.3 of xs-dev to provide improved output from the info
command based on this feedback. Overall better handling is on the roadmap to ship v1.0. Thank you for your patience and trying out xs-dev. 🙏
Stale. Will reopen if still happens after a system cleanup.
From what I understand of this error, the tool (gluegun? cross-spawn?) does not succeed in calling
npm
. It is globally installed withnvm
on this system and is usually working fine.macOS Sonoma 14.2.1 node 21.6.0 npm 10.2.4 xs-dev 0.30.2
Has anyone any idea where it is going wrong?