Error starting bp on Mac M1 Big Sur

Hi there,

I am trying to run the bp.exec on an M1 Mac on Big Sur 11.1

Getting the following error:

Error: Could not require NativeExtension “crfsuite.node” for OS “darwin”.

I already tried several versions of node.js without success. It does not seem to be an node issue.

Is there any support for my setup at this time?

Greetings
Lorenz

Hi @lorautumn

Nobody here has actually tried Botpress on the new M1 processor, but this was an expected problem.

The native extensions are C/C++ libraries build specifically for each plateform. There’s no currently no extensions built for the new M1 processor and I don’t even know if node-gyp supports building node-bindings for M1 yet.

We’ll sure look into this problem soon, but for now, here are your options:
1 - Emulate an intel processor to run botpress
2 - Try building one of these libraries on your system:

(I would start by trying to build node-svm-napi as I believe its the easiest one)

If you succeed building all of the above, well surely find a way to make Botpress run on M1 processors!

If you’re interested by this challenge and need more instructions on how to do so, let me know!

This would really help us and our community.

François

Hi François

Thanks for your reply. I am willing to help getting things running. Please give me further instructions on building the libraries.

As soon as I find some spare time I will look into it.

I have another question. I ran Botpress via `npm install -g botpress’. I got the studio running. Now I am wondering how I can manage to make use of entity extraction. I found out that the native nlu does not support that. What nlu is the bp.exec versions running, which supports entity extraction.

Lorenz

Hi again,

I will give you instructions on building the native extension during the week.

For your second question, Botpress is no longuer an npm package unfortunatly. This means that with the command npm install -g botpress, you have installed are really old version of botpress that we no longuer support. The only true way of using botpress are:

  • from sources (clone from our github)
  • from binary (download from official website)
  • from docker image

I’ll keep you updated,

Thanks you your contribution to this forum,

François

I have this problem too. you can go to “system preferences → security and privacy” and manually allow it. However, Big Sur is doing this for every .node file in the whole directory. This obviously takes forever! I think this is therefore an issue with the new Mac permissions system, part of Apple’s ongoing quest to stop you running anything that’s not been downloaded from the App Store :roll_eyes:

If there’s a way to recursively approve files from the command line that would fix it I’m pretty sure.

Or maybe this is a parallel issue - not sure?

@kimadactyl

Are you using mac’s processor M1 ?

I feel like your problem has nothing to do with the current thread.

Your problem concerns all macos users weither they use an M1 processor or a an intel. You should create a new thread on this forum specific to your problem.

François

yeah sorry for the confusion, lockdown has fried my brain. apols!

1 Like

Update:

I managed to get it running on Big Sur. It seemed to be not an M1 issue at all.

I redownloaded the latest version of botpress. After starting bp.exec the execution got rejeced by MacOS due to security issues. Then I went to Mac Settings → Security → General Tab. On the lower part of that tab you can see the last security issue. Then I clicked on ‘run anyway’. Then I ran bp.exec again and another security issue popped. I repeated the above steps for all security issues popping on start of the bp.exec. In the end botpress started and the server was running.

Lorenz

2 Likes

@lorautumn Woww really?

I’m sorry I really tought the native extensions could not run on M1. Well this is great news.

Can you confirm you’ve successfully ran a training with intents and slots and that the bot seems to work fine?

Also, have you tried hosting a language server locally on your machine?

I just ran the book-flight demo. Training was successful.

The bot is doing its work as inteded.

Can you explain how to run a language server locally?

Btw. It is running via ARM terminal. Not on an emulated Rosetta2 terminal. :slight_smile:

1 Like

Here’s the documentation for a local lang server: Hosting · | Developer's Guide.

Thanks a lot for making theses tests and contributing to the community forum.

François