metaplex-foundation / metaplex

A directory of what the Metaplex Foundation works on!
https://metaplex.com
Apache License 2.0
3.32k stars 6.26k forks source link

symbol not found in flat namespace '_cairo_fill' #1271

Closed AlexLup06 closed 2 years ago

AlexLup06 commented 2 years ago

Hi, when running ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts --version I get this error

Error: dlopen(/Users/me/Documents/metaplex-master/js/node_modules/canvas/build/Release/canvas.node, 0x0001): symbol not found in flat namespace '_cairo_fill'
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1183:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/me/Documents/metaplex-master/js/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_DLOPEN_FAILED'
}

I am on new MacBook Pro 14'' with m1 pro chip.

alvinsga commented 2 years ago

Experiencing the same issue on the M1 Pro chip

AlexLup06 commented 2 years ago

Experiencing the same issue on the M1 Pro chip

So it now works for me. So I guess if you get this error you already got past the point of yarn install in the js directory. If not I can help you with that. Because the canvas module is not properly working with arm64 architecture.

with the candy machines i tried many things and I think what worked for me was to downgrade node (with that npm) and then npm install yarn and ts-node with the version 14.18 of node.

alvinsga commented 2 years ago

Thank you! Downgrading to Node 14.18.2 and reinstalling packages using yarn solved the issue for me

kcc0 commented 2 years ago

None of this worked for me. Can someone please help Here's my log file when I try to install Canvas.

2022-01-22T13_54_40_954Z-debug.log ?

BinghuiXie commented 1 year ago

Thank you! Downgrading to Node 14.18.2 and reinstalling packages using yarn solved the issue for me

helps a lot!