why expo gets script from devDependecies?

expo diagnostics:

Expo CLI 4.0.13 environment info:
      OS: Linux 5.8 Ubuntu 20.04.2 LTS (Focal Fossa)
      Shell: 5.0.17 - /bin/bash
      Node: 14.15.2 - /usr/local/bin/node
      Yarn: 1.22.5 - /usr/bin/yarn
      npm: 6.14.9 - /usr/local/bin/npm
      expo: ^40.0.0 => 40.0.1 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: 0.63.4 => 0.63.4 
      react-native-web: ~0.13.12 => 0.13.18 
      expo-cli: 4.0.13
    Expo Workflow: bare

I’m using my own npm package, which is in devDependecies, for prepare some assets for an app before build it. And in that package I’m using es2020 feature optional chaining (object?.property). And I get error on expo start, that there is no such a loader for a feature. I had the same error before, when I used matchAll, but when I moved this logic into devDependencies – error disappeared.

For now I just rewrote code without optional chaining, but I’m afraid and wondered why expo gets this script on building the app… It shouldn’t do it… How to avoid this?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.