`npm run ios` not working on M1

I am not able to build the iOS Mattermost app on my M1 Mac using npm run ios. I get the following error:

ld: building for iOS Simulator, but linking in dylib built for iOS, file ‘/Users/florentin/Developer/ktalk/node_modules/react-native-webrtc/ios/WebRTC.framework/WebRTC’ for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

When running Xcode under Rosetta I have a different error with the command line but I can build correctly with Xcode:

/Users/florentin/Developer/ktalk/ios/Mattermost.xcodeproj: error: The linked library ‘libPods-Mattermost.a’ is missing one or more architectures required by this target: arm64. (in target ‘Mattermost’ from project ‘Mattermost’)

Any ideas on how to make the command-line running? I didn’t try yet the npm run build:ios command but I think that this can be a blocker for this too…