eXist-db / xst

Command line tool to interact with exist-db instances
https://npmjs.com/@existdb/xst
MIT License
17 stars 4 forks source link

Cannot find package 'execa' #93

Closed daliboris closed 1 year ago

daliboris commented 1 year ago

What happened?

After installing xst globally, setting the path to the npm repository (C:\Users\<User>\AppData\Roaming\npm) and running xst from Windows Powershell Command, or a Command Prompt the error Cannot find package 'execa' is thrown.

Xst program will not run.

System Information

Microsoft Windows [Version 10.0.19045.2604]

Relevant shell output

PS C:\Users\<User>> xst --version

node:internal/errors:464
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'execa' imported from C:\Users\<User>\AppData\Roaming\npm\node_modules\@existdb\xst\commands\edit.js
    at new NodeError (node:internal/errors:371:5)
    at packageResolve (node:internal/modules/esm/resolve:884:9)
    at moduleResolve (node:internal/modules/esm/resolve:929:18)
    at defaultResolve (node:internal/modules/esm/resolve:1044:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
    at link (node:internal/modules/esm/module_job:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}
line-o commented 1 year ago

execa is a new dependency introduced with the edit feature. There might be an issue with this. You could try and install the version before that.

npm install -g @existdb/xst@1.5.0

Also, I do not really understand what you mean by adding it to npm.

daliboris commented 1 year ago

You're right, version 1.5.0 works fine.

I wasn't adding it to npm. I just needed to add the path to the npm repository to the PATH variable (this information was missing in my report, sorry) on my Windows machine, otherwise running the xst command didn't work.

line-o commented 1 year ago

@daliboris hmm, it seems that xst --version now fails for me too with xst 1.6.0.

line-o commented 1 year ago

Thanks for reporting this. The execa dependency was missing in package.json (!)

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.6.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: