Back

[SOLVED] Cannot use appwrite CLI

  • 1
  • Tools
  • Functions
polbuhanky
9 Sep, 2023, 08:28

Get this error in Windows:

PS C:\Users\Xiaomi> appwrite -v pkg/prelude/bootstrap.js:1740 throw error; ^

Error: Cannot find module 'C:\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: 'C:snapshotsdk-for-clinode_modulesaxiospackage.json', pkg: true }
TL;DR
Issue: The user cannot use the appwrite CLI and encounters an error "Cannot find module 'C:\snapshot\sdk-for-cli\node_modules\axios\dist\node\axios.cjs'" Solution: The user can try the following steps to resolve the issue: 1. Check the version of Node.js by running `node -v`. 2. Ensure that the appwrite CLI is installed globally using `npm install -g appwrite-cli`. 3. Run `npx appwrite -v` to check the version of the appwrite CLI. 4. If the error persists, it may be a bug. In the meantime
Osman
9 Sep, 2023, 08:30
Osman
9 Sep, 2023, 08:31

Did you install using npm install -g appwrite-cli?

polbuhanky
9 Sep, 2023, 08:31

Yes, i called it

Osman
9 Sep, 2023, 08:32

try running npx appwrite -v

polbuhanky
9 Sep, 2023, 08:33

Oh, that's works:))

Osman
9 Sep, 2023, 08:33

Yea, don't know what the issue is, but you can use that untill they fix the bug 🙂

polbuhanky
9 Sep, 2023, 08:34

Thank you, Osman!<:appwritepeepo:902865250427215882>

polbuhanky
9 Sep, 2023, 08:35

[SOLVED] Cannot use appwrite CLI

Osman
9 Sep, 2023, 08:35

Whats your node version btw? @polbuhanky

polbuhanky
9 Sep, 2023, 08:37

npx appwrite -v 4.0.0

Or did you mean another version?

Osman
9 Sep, 2023, 08:37

when you run node -v

polbuhanky
9 Sep, 2023, 08:37

v18.13.0v

Osman
9 Sep, 2023, 08:38

Okay, thanks 👍

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more