Skip to content

Conversation

@cemarta7
Copy link

I was able to fix issue 22 if runnign under Rosetta2 we need to do one more check.

@gwleuverink
Copy link
Contributor

We need to verify this is the same issue as NativePHP/desktop#22

I suspect your problem is caused by running npm under rosetta on a Apple Sillicon machine.

The OP of the linked issue is on a Intel machine and correctly using the x86 binary.

You are both seeing the same error, but perhaps for different reasons:

  • there may be an issue with the mac x86 binary (you both see this error)
  • you should not be using the x86 binary int the first place

@gwleuverink
Copy link
Contributor

Could you check the output of these commands for me?

# Check which architecture your terminal is using
arch

# Check Node's architecture
node -p "process.arch"

# Check nvm's default architecture
nvm current

@gwleuverink
Copy link
Contributor

Can you check if the fix here does anything for you?

NativePHP/desktop#22 (comment)

I expect it will then build with the correct x86 binary. Your error would disappear, but you'd still run it under rosetta under the hood.

I think this might only be the case when running native:run where it's arch is mismatched due to running node under rosetta. But when building the architecture is passed in, not detected. So in theory your build should use the correct binary.

Can you verify that hypothesis?

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

Successfully merging this pull request may close these issues.

Call to undefined function mb_split() - Missing mbstring extension in bundled PHP binary on macOS

2 participants