tauri: Cannot find module '@tauri-apps/cli-darwin-x64'
HI!
I tried running the examples/aåpi the way the documention says to. I am getting this
`yarn tauri dev yarn run v1.22.19 warning package.json: No license field warning …/…/…/…/…/package.json: No license field $ node …/…/tooling/cli/node/tauri.js dev /Users/ed/dev/rust/tauri/tooling/cli/node/index.js:234 throw loadError ^
Error: Cannot find module ‘@tauri-apps/cli-darwin-x64’ Require stack:
- /Users/ed/dev/rust/tauri/tooling/cli/node/index.js
- /Users/ed/dev/rust/tauri/tooling/cli/node/main.js
- /Users/ed/dev/rust/tauri/tooling/cli/node/tauri.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:93:18) at Object.<anonymous> (/Users/ed/dev/rust/tauri/tooling/cli/node/index.js:111:29) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions…js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Module.require (internal/modules/cjs/loader.js:974:19) { code: ‘MODULE_NOT_FOUND’, requireStack: [ ‘/Users/ed/dev/rust/tauri/tooling/cli/node/index.js’, ‘/Users/ed/dev/rust/tauri/tooling/cli/node/main.js’, ‘/Users/ed/dev/rust/tauri/tooling/cli/node/tauri.js’ ] } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`
I’m on a Mac M1 Pro, latest MacOS Ventura.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 3
- Comments: 16 (3 by maintainers)
I had the same issue on Linux and seem to have fixed it by deleting the
package-lock.jsonfile, removingnode_modulesand runningnpm iagain.hello, i have the same problem, if i try to install on windows works smoothly but on a x86 mac it installs api and cli but not find cli-darwin-x64. Even if i copy the folder from another project it works until the next npm install
Kinda weird that it’s trying to find
@tauri-apps/cli-darwin-x64instead of@tauri-apps/cli-darwin-arm64(or./cli.darwin-arm64.nodewhen you build it locally).What is the output of
$ node -p "process.arch"? From the error message it’ll printx64, which is not your actual architecture (should actually printarm64). Maybe you’re running a Rosetta Node.js? Try reinstalling Node.Checking further, I think none of the examples that need
yarnornodeto run are working.