
When running: "curl -sL https://appwrite.io/cli/install.sh | bash" I get an error when running appwrite -v:
throw error;
^
Error: Cannot find module '/snapshot/sdk-for-cli/node_modules/axios/dist/node/axios.cjs'
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)
at resolveExports (node:internal/modules/cjs/loader:482:14)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function._resolveFilename (pkg/prelude/bootstrap.js:1819:46)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at Module.require (pkg/prelude/bootstrap.js:1719:31)
at require (node:internal/modules/cjs/helpers:102:18) {
code: 'MODULE_NOT_FOUND',
path: '/snapshot/sdk-for-cli/node_modules/axios/package.json',
pkg: true
}


Seems to work perfectly fine for me. This was a fresh install though

Maybe try uninstalling the old CLI?

rm -f /usr/local/bin/appwrite | bash
then run
curl -sL https://appwrite.io/cli/install.sh | bash

Hmm uninstalling it does not seem to help. Also tried with npm.. Gives this error when doing appwrite -v:
if (data[key]?.constructor?.name === 'BigNumber') {
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/usr/local/lib/node_modules/appwrite-cli/index.js:11:44)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

It works fine when installing version 2.0.2, by creating the script locally and replacing 4.0.0 with 2.0.2

Did you do appwrite -v?

ah yes I get the same error in this

Yea, it installs fine, but throws the error when used

what version of node?

16.17.0

FYI, it's best to wrap code in backticks to format a bit nicer. You can use 1 backtick for inline code (https://www.markdownguide.org/basic-syntax/#code) and 3 backticks for multiline code (https://www.markdownguide.org/extended-syntax/#syntax-highlighting.

here's an issue: https://github.com/appwrite/sdk-for-cli/issues/95

something might be weird with your docker version...i would only expect this error on older versiosn of node

looks like you get the error if you're on node 12

Noted

Oh. Thats my bad. I accidently checked the node version of my local pc. It seems that the ubuntu server runs on node 12.22.9. I will update and check soon.

After updating to node version 16.20.2, i still get the same error when trying to use the appwrite CLI 4.0.0

It seems to work fine when installing globally through npm and executing with npx. Guess i can just do that instead.

Same issue here(Windows): https://discord.com/channels/564160730845151244/1149984724547276901

for me, npm install -g appwrite-cli
thrown some permission errors. so had to do sudo npm install -g appwrite-cli
and then it worked fine.
OS: Ubuntu Linux Node: v19.9.0

[SOLVED] Appwrite CLI linux not working
Recommended threads
- appwrite cli alpine os
the appwrite cli does not work on alpine os if you install it using the recommended bash script. Maybe there is the possibility to compile it for alpine using t...
- Account reset to 'Free' status
I have issues with my account basically being reset to the default 'Free' status. We're still being billed but no billiung info in system and no projects etc. N...
- Vercel Deployment issue
I am trying to deploy my web project using vercel, but in the deployed link, it is fetching some of the attributes and for the rest it is giving "not found" err...
