Open edimoldovan opened 1 year ago
Checking further, I think none of the examples that need yarn
or node
to run are working.
Did you say yes
when the script asked if you want to install the node cli? (We should change it up a bit since it's required now)
Yes, I did.
Kinda weird that it's trying to find @tauri-apps/cli-darwin-x64
instead of @tauri-apps/cli-darwin-arm64
(or ./cli.darwin-arm64.node
when you build it locally).
What is the output of $ node -p "process.arch"
? From the error message it'll print x64
, which is not your actual architecture (should actually print arm64
). Maybe you're running a Rosetta Node.js? Try reinstalling Node.
I have the same issue and I'm on a Intel CPU
I hit this but on Linux, in a CI build:
$ npm i
added 848 packages in 19s
146 packages are looking for funding
run `npm fund` for details
$ npm run tauri.build
> our-package@0.0.0 tauri.build
> tauri build
/builds/...../our-package/node_modules/@tauri-apps/cli/index.js:234
throw loadError
^
Error: Cannot find module '@tauri-apps/cli-linux-x64-gnu'
The npm run tauri.build
command is defined as tauri build
in my package.json.
I had the same issue on Linux and seem to have fixed it by deleting the package-lock.json
file, removing node_modules
and running npm i
again.
I also encountered this problem on Mac M1 Pro after upgrade OS version to Ventura.
you can install higher version of node .
I use nvm manage node. By use higher version of node ,I can BUILD .
@edimoldovan @zhanglun
you can install higher version of node . I use nvm manage node. By use higher version of node ,I can BUILD . @edimoldovan @zhanglun
the image from nvm. https://github.com/nvm-sh/nvm
you can install higher version of node . I use nvm manage node. By use higher version of node ,I can BUILD . @edimoldovan @zhanglun
still not work for me. But I solved it with:
cd src-tauri
cargo clean
cargo build
Upgrading to node v16.17.0 (lts/gallium
) from node v14.20.0 (lts/fermium
) fixed it for me.
If you are migrating from Mac M1 to x86 device, you'll need to delete the package-lock.json and node_modules then run npm i again to reinstall all the dependencies.
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
I've had this problem in CI, and added the following to fix it:
- name: Install frontend dependencies
run: npm install
- name: Install Tauri cli
run: npm install --save-dev @tauri-apps/cli
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:
I'm on a Mac M1 Pro, latest MacOS Ventura.