Skip to content

Instantly share code, notes, and snippets.

@msell
Created June 8, 2022 02:14
Show Gist options
  • Save msell/953911bdfcb21d3ee414c96a441587d6 to your computer and use it in GitHub Desktop.
Save msell/953911bdfcb21d3ee414c96a441587d6 to your computer and use it in GitHub Desktop.
SDK45-assets

NPM attempt

I did experement with changing over to NPM all toghether but it had its own set of issues and in the end does not seem to put us in a better spot than we were in with yarn. Here were the steps I followed to try out NPM:

  1. Update package.json to use NPM instead of Yarn commands, then run synp to create package-lock.json
  2. rm -rf node_modules && npm i && npm start:web to test the conversion to NPM was successful.
  3. Error running web - @sentry/types module was not found. I will reinstall with npm i -D @sentry/types but this is a red flag that the converstion from Yarn to NPM did not completely work
  4. After installing @sentry types I can confirm the web version and the native versions still work.
  5. Using [email protected] run expo upgrade
  6. The interesting thing here is that the output of expo upgrade indicates that they delete the package-lock.json file and node_modules as part of the upgrade process. This seems like it could be problematic. Once the upgrade was complete I ran npm i again in order to generate the package-lock.json
  7. 💥 At this point web is broken - TypeError global.__reanimatedWorkletInit is not a function related to react-native-gesture-handler
  8. git reset --hard && rm -rf node_modules && npm i to get back to last known good state

IMO it is not worth persuing NPM at this point - the fact that expo deletes the lock file - it's likely we will face the same react-native-gesture handler issues with yarn. Also npm is noticeably slower than yarn

diff --git a/package.json b/package.json
index 09139ffd..818baed8 100644
--- a/package.json
+++ b/package.json
@@ -33,10 +33,10 @@
},
"dependencies": {
"@apollo/react-hooks": "^3.1.3",
- "@expo/webpack-config": "~0.16.2",
+ "@expo/webpack-config": "~0.16.21",
"@hookform/resolvers": "^2.8.2",
- "@react-native-async-storage/async-storage": "~1.15.0",
- "@react-native-community/netinfo": "7.1.3",
+ "@react-native-async-storage/async-storage": "~1.17.3",
+ "@react-native-community/netinfo": "8.2.0",
"@react-navigation/bottom-tabs": "^6.0.5",
"@react-navigation/devtools": "^6.0.1",
"@react-navigation/material-top-tabs": "^6.0.2",
@@ -60,34 +60,34 @@
"date-fns-tz": "^1.1.3",
"date-time-format-timezone": "^1.0.22",
"dotenv": "^8.2.0",
- "expo": "^44.0.0",
- "expo-analytics-segment": "~11.1.0",
- "expo-app-loading": "~1.3.0",
- "expo-application": "~4.0.1",
- "expo-asset": "~8.4.6",
- "expo-av": "~10.2.0",
- "expo-background-fetch": "~10.1.0",
- "expo-camera": "~12.1.2",
- "expo-clipboard": "~2.1.0",
- "expo-constants": "~13.0.1",
- "expo-device": "~4.1.0",
- "expo-file-system": "~13.1.4",
- "expo-firebase-analytics": "~6.0.0",
- "expo-firebase-core": "~4.1.0",
- "expo-font": "~10.0.4",
- "expo-image-picker": "~12.0.1",
- "expo-linear-gradient": "~11.0.3",
- "expo-linking": "~3.0.0",
- "expo-localization": "~12.0.0",
- "expo-location": "~14.0.1",
- "expo-media-library": "~14.0.0",
- "expo-modules-core": "~0.6.4",
- "expo-network": "~4.1.0",
- "expo-notifications": "~0.14.0",
- "expo-secure-store": "~11.1.0",
- "expo-sharing": "~10.1.0",
- "expo-task-manager": "~10.1.0",
- "expo-updates": "~0.11.6",
+ "expo": "^45.0.0",
+ "expo-analytics-segment": "~11.2.0",
+ "expo-app-loading": "~2.0.0",
+ "expo-application": "~4.1.0",
+ "expo-asset": "~8.5.0",
+ "expo-av": "~11.2.3",
+ "expo-background-fetch": "~10.2.0",
+ "expo-camera": "~12.2.0",
+ "expo-clipboard": "~3.0.1",
+ "expo-constants": "~13.1.1",
+ "expo-device": "~4.2.0",
+ "expo-file-system": "~14.0.0",
+ "expo-firebase-analytics": "~7.0.0",
+ "expo-firebase-core": "~5.0.0",
+ "expo-font": "~10.1.0",
+ "expo-image-picker": "~13.1.1",
+ "expo-linear-gradient": "~11.3.0",
+ "expo-linking": "~3.1.0",
+ "expo-localization": "~13.0.0",
+ "expo-location": "~14.2.2",
+ "expo-media-library": "~14.1.0",
+ "expo-modules-core": "~0.9.2",
+ "expo-network": "~4.2.0",
+ "expo-notifications": "~0.15.2",
+ "expo-secure-store": "~11.2.0",
+ "expo-sharing": "~10.2.0",
+ "expo-task-manager": "~10.2.1",
+ "expo-updates": "~0.13.2",
"firebase": "^9.2.0",
"google-map-react": "2.1.7",
"graphql": "^15.5.0",
@@ -100,33 +100,33 @@
"lodash": "^4.17.21",
"lottie-react-native": "5.0.1",
"rc-progress": "3.1.1",
- "react": "17.0.1",
+ "react": "17.0.2",
"react-datepicker": "^3.4.1",
- "react-dom": "17.0.1",
+ "react-dom": "17.0.2",
"react-error-boundary": "^1.2.5",
"react-hook-form": "^7.22.4",
"react-i18next": "^11.8.5",
"react-lottie": "^1.2.3",
- "react-native": "0.64.3",
+ "react-native": "0.68.2",
"react-native-boring-avatars": "^1.0.1",
"react-native-flagsmith": "^2.0.9",
- "react-native-gesture-handler": "~2.1.0",
- "react-native-get-random-values": "~1.7.0",
+ "react-native-gesture-handler": "~2.2.1",
+ "react-native-get-random-values": "~1.8.0",
"react-native-navigation-directions": "^1.0.3",
- "react-native-pager-view": "5.4.9",
+ "react-native-pager-view": "5.4.15",
"react-native-paper": "^4.9.2",
- "react-native-reanimated": "~2.3.1",
- "react-native-safe-area-context": "3.3.2",
- "react-native-screens": "~3.10.1",
+ "react-native-reanimated": "~2.8.0",
+ "react-native-safe-area-context": "4.2.4",
+ "react-native-screens": "~3.11.1",
"react-native-svg": "12.3.0",
"react-native-tab-view": "2.16.0",
"react-native-vector-icons": "^8.0.0",
- "react-native-web": "0.17.1",
+ "react-native-web": "0.17.7",
"react-native-web-hooks": "^3.0.1",
- "react-native-webview": "11.15.0",
+ "react-native-webview": "11.18.1",
"rn-pdf-reader-js": "^4.1.1",
"rn-placeholder": "^3.0.0",
- "sentry-expo": "^4.0.0",
+ "sentry-expo": "^4.2.0",
"subscriptions-transport-ws": "^0.9.16",
"uuid": "^8.3.2",
"yup": "^0.32.11"
@@ -135,7 +135,7 @@
"@babel/core": "^7.12.9",
"@babel/helper-define-map": "^7.13.12",
"@babel/preset-typescript": "^7.12.7",
- "@expo/config": "3.3.27",
+ "@expo/config": "~6.0.19",
"@graphql-codegen/add": "^1.15.3",
"@graphql-codegen/cli": "^2.3.1",
"@graphql-codegen/introspection": "1.12.2",
@@ -163,7 +163,7 @@
"@types/react": "~17.0.21",
"@types/react-datepicker": "^2.11.1",
"@types/react-lottie": "^1.2.5",
- "@types/react-native": "~0.64.12",
+ "@types/react-native": "~0.67.6",
"@types/react-outside-click-handler": "^1.3.0",
"@types/spark-md5": "^3.0.2",
"@types/uuid": "^8.3.1",
@@ -173,7 +173,7 @@
"@welldone-software/why-did-you-render": "^6.2.1",
"babel-loader": "^8.2.2",
"babel-plugin-module-resolver": "^4.1.0",
- "babel-preset-expo": "9.0.1",
+ "babel-preset-expo": "~9.1.0",
"chance": "^1.1.6",
"eslint": "^7.18.0",
"eslint-config-prettier": "^6.15.0",
@@ -192,7 +192,7 @@
"husky": "^4.3.8",
"inquirer": "^8.1.1",
"jest": "^26.6.3",
- "jest-expo": "^44.0.0",
+ "jest-expo": "^45.0.0",
"lint-staged": "^10.5.3",
"nanoid": "^3.1.25",
"patch-package": "^6.2.2",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment