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

Installation Error om mac M2 #177

Open
kamalkech opened this issue Nov 22, 2023 · 2 comments
Open

Installation Error om mac M2 #177

kamalkech opened this issue Nov 22, 2023 · 2 comments

Comments

@kamalkech
Copy link

 gyp: name 'mpg123_cpu' is not defined while evaluating condition 'mpg123_cpu=="arm_nofpu"' in deps/mpg123/mpg123.gyp while loading dependencies o
│ gyp ERR! configure error 
│ gyp ERR! stack Error: `gyp` failed with exit code: 1
│ gyp ERR! stack     at ChildProcess.onCpExit (/Users/myuser/.nvm/versions/node/v18.16.0/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/con
│ gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
│ gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
│ gyp ERR! System Darwin 23.0.0
│ gyp ERR! command "/Users/myuser/.nvm/versions/node/v18.16.0/bin/node" "/Users/myuser/.nvm/versions/node/v18.16.0/lib/node_modules/pnpm/dist/n
│ gyp ERR! cwd /Users/myuser/Projects/DyaliCode/AI/ai-voice/node_modules/.pnpm/[email protected]/node_modules/speaker
│ gyp ERR! node -v v18.16.0
│ gyp ERR! node-gyp -v v9.3.1
│ gyp ERR! not ok 

any idea ??

@adnikiforov
Copy link

I've found solution, at least it is working locally, but if you need this as a dependency, you may need some extra steps.

Add to deps/mpg123/mpg123.gyp at variables block (line 11)

'mpg123_cpu%': '',

Then copy deps/mpg123/config/linux/arm to deps/mpg123/config/mac and rename newly copied directory to arm64

Then you can try and run node-gyp configure and node-gyp build or just npm install . from the root.
At this point you should have working node-speaker library.

Again, if you need to use as dependency, you might need to run npm link %path_to_node_speaker% from your app root in order for your app to use locally built node-speaker and not remote one.

Hope that helps!
I might open PR later.

@adnikiforov
Copy link

Actually, there is PR already https://github.com/TooTallNate/node-speaker/pull/178/files

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

No branches or pull requests

2 participants