Unable to resolve “storybook/internal/preview-api” from “node_modules@storybookpreview-apishim.mjs”

I am a bit lost with all the expo and expo-cli tools and their local/global versions.
I have an expo react native project using storybook with the current package.json

{
  "version": "1.0.0",
  "private": true,
  "name": "rn-libraries",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "storybook-generate": "sb-rn-get-stories -js",
    "storybook": "cross-env STORYBOOK_ENABLED='true' expo start",
    "storybook:ios": "cross-env STORYBOOK_ENABLED='true' expo start --ios",
    "storybook:android": "cross-env STORYBOOK_ENABLED='true' expo start --android"
  },
  "dependencies": {
    "@babel/core": "^7.20.0",
    "@expo/metro-runtime": "^3.2.1",
    "@expo/vector-icons": "^13.0.0",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/datetimepicker": "6.7.3",
    "@react-native-community/slider": "4.4.2",
    "@react-navigation/native": "^6.1.18",
    "@react-navigation/native-stack": "^6.10.1",
    "@reduxjs/toolkit": "^2.2.6",
    "@storybook/addon-ondevice-actions": "^7.6.20",
    "@storybook/addon-ondevice-controls": "^7.6.20",
    "@storybook/preview-api": "^8.2.6",
    "@storybook/react": "^8.2.6",
    "@storybook/react-native": "^7.6.20",
    "babel-loader": "^9.1.3",
    "cross-env": "^7.0.3",
    "expo": "~48.0.21",
    "expo-constants": "~14.2.1",
    "metro": "^0.80.9",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.71.14",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-paper": "^5.12.3",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-svg": "13.4.0",
    "react-native-web": "~0.18.10",
    "typescript": "^4.9.4",
    "@types/react": "~18.0.27"
  }
}


As far as I understood, if you run $ [npx expo install](https://docs.expo.dev/more/expo-cli/#install) <package-name> the script finds the corresponding version of the package to install it on my project.
So I had declared the [email protected] on my package.json, and I installed the rest of the libs based on that version.

The issue started when I had to upgrade the expo to SDK 51, and I followed the docs. At some point the project stopped being able to create a working build.
I was getting this error instead:

So I tried to roll-back to the older package.json that worked before. I deleted the node_modules, package-lock.json and npm install the older versions of that project. However the error persisted. Even though I have the whole project configed as I used to have it in the past (it was working), now it doesn’t work.

Important to note that another developer with the “older” package.json ( I attached it bellow ), is able to make it run, whereas me with the same state/config of the project I cannot.

So I am wondering how did the upgrade of expo@51 affected my system? What is the point of having defined the expo version on package.json while it doesn’t work as expected?

The “older” package json that is working for another developer but not on my PC. (The older version has some incompatibilities, but still works to another developer)

{
  "version": "1.0.0",
  "private": true,
  "name": "rn-libraries",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "storybook-generate": "sb-rn-get-stories -js",
    "storybook": "cross-env STORYBOOK_ENABLED='true' expo start",
    "storybook:ios": "cross-env STORYBOOK_ENABLED='true' expo start --ios",
    "storybook:android": "cross-env STORYBOOK_ENABLED='true' expo start --android"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/datetimepicker": "^6.7.3",
    "@react-native-community/slider": "4.4.2",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/native-stack": "^6.9.17",
    "@storybook/addon-ondevice-actions": "^7.6.14",
    "@storybook/addon-ondevice-controls": "^7.6.14",
    "@storybook/preview-api": "^8.0.8",
    "@storybook/react": "^8.0.8",
    "@storybook/react-native": "^7.6.14",
    "babel-loader": "^9.1.3",
    "cross-env": "^7.0.3",
    "metro": "^0.80.8",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "typescript": "^4.6.3"
  },
  "peerDependencies": {
    "@expo/metro-runtime": "^3.1.1",
    "@expo/vector-icons": "^13.0.0",
    "@reduxjs/toolkit": "^2.2.3",
    "@types/react": "^18.2.25",
    "expo": "~48.0.21",
    "expo-constants": "~14.2.1",
    "i18n-js": "^4.3.2",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.71.14",
    "react-native-paper": "^5.12.3",
    "react-native-svg": "13.4.0",
    "react-native-web": "~0.18.10",
    "react-redux": "^9.1.0"
  },
  "dependencies": {
    "@react-native-picker/picker": "^2.7.7",
    "react-native-phone-number-input": "^2.1.0"
  }
}


I tried to roll-back using Git, to the version that the project could work. I was deleting the node_modules and package-lock.json, then npm install the configed libs. Still I was getting the error that started appearing when i first upgraded expo@51. In the meantime those versions are working to another developer that hasn’t upgraded expo yet.

I need help to understand why this error started appearing right after I tried to upgrade to expo@51 and how to resolve the error “Unable to resolve “storybook/internal/preview-api” from “node_modules@storybookpreview-apishim.mjs””

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật