Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tauri not Work in Mac M1 chip #1320

Closed
mehdiraized opened this issue Mar 4, 2021 · 6 comments
Closed

Tauri not Work in Mac M1 chip #1320

mehdiraized opened this issue Mar 4, 2021 · 6 comments

Comments

@mehdiraized
Copy link
Contributor

this command not work

yarn add tauri

error:

error /tauri/node_modules/sharp: Command failed.
Exit code: 127
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /tauri/node_modules/sharp
Output:
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-darwin-arm64v8.tar.br
ERR! sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
@domielias
Copy link

Hi @mehdiraized , you need to compile libvips because it's not available yet for Sharp. I found something relate with this that can help you:
Related link

Hope that this could help you!

@mikart143
Copy link

Or even simpler. Just install this with brew.sh : libvips

@pannous
Copy link

pannous commented Mar 9, 2021

Tauri on M1 is still not working because of canvas:

$ /opt/tauri/node_modules/.bin/tauri dev
[tauri]: running dev
node:internal/modules/cjs/loader:1151
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: dlopen(/Users/me/dev/script/js/node_modules/canvas/build/Release/canvas.node, 1): no suitable image found.  Did find:
	/Users/me/dev/script/js/node_modules/canvas/build/Release/canvas.node: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
	/Users/me/dev/script/js/node_modules/canvas/build/Release/canvas.node: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1151:18)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/me/dev/script/js/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14) {
  code: 'ERR_DLOPEN_FAILED'
}

@domielias
Copy link

Tauri on M1 is still not working because of canvas:

$ /opt/tauri/node_modules/.bin/tauri dev
[tauri]: running dev
node:internal/modules/cjs/loader:1151
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: dlopen(/Users/me/dev/script/js/node_modules/canvas/build/Release/canvas.node, 1): no suitable image found.  Did find:
	/Users/me/dev/script/js/node_modules/canvas/build/Release/canvas.node: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
	/Users/me/dev/script/js/node_modules/canvas/build/Release/canvas.node: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1151:18)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/me/dev/script/js/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14) {
  code: 'ERR_DLOPEN_FAILED'
}

I think that you should open a new issue relate with this error.

@mikart143
Copy link

Please make small reproducible example or post package.json and cargo.toml.
For me all the things works just fine, even with some weird stuff under the hood.
Pic for showing that it works.
image

@nothingismagick
Copy link
Sponsor Member

I am closing too, because I am running on the M1 as well and do not face these problems. Also, you provided a PR that fixed this issue. Thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants