Skip to content

Cannot upgrade from 0.63.4 to 0.64, 0.65 or 0.66 #178

Closed
@tijs

Description

@tijs

Environment

System:
OS: macOS 11.6
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 3.11 GB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.4.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.21.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
Android SDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7678000
Xcode: 13.0/13A233 - /usr/bin/xcodebuild
Languages:
Java: 11.0.12 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.65.1 => 0.65.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Things I’ve done to figure out my issue

  • I've use upgrade helper to update all package versions to the exact same as 0.64 up to 0.66
  • I have tried the latest babel versions as well
  • I have tried to use the 0.63 babel versions with later versions of RN
  • I have tried several different metro & babel configurations
  • I have tried setting the resolution fields for metro dependencies the same in my project as in 0.63

Upgrading version

I would like to upgrade to the latest stable from 0.63.4, tried 0.64, 0.65 and the 0.66 rc versions

Description

As soon as I bump the react-native version beyond 0.63.4, even if I keep my babel versions the same, metro stops being able to create a valid bundle.

If I run:

npx react-native bundle --platform ios --entry-file index.js --bundle-output ./bundles/index.ios.bundle --assets-dest ./bundles/ --dev true

I will get the following error:

error lib/src/service/LocationService.ts: function (path) {
          return fn.call(state, path, state);
        } could not be cloned.
Error: function (path) {
          return fn.call(state, path, state);
        } could not be cloned.
    at Object.serialize (node:v8:260:7)
    at _default (/Users/tijs/projects/persgroep/popular-platform-app/node_modules/@babel/core/lib/transformation/util/clone-deep.js:22:34)
    at normalizeFile (/Users/tijs/projects/persgroep/popular-platform-app/node_modules/@babel/core/lib/transformation/normalize-file.js:84:36)
    at normalizeFile.next (<anonymous>)
    at run (/Users/tijs/projects/persgroep/popular-platform-app/node_modules/@babel/core/lib/transformation/index.js:29:50)
    at run.next (<anonymous>)
    at /Users/tijs/projects/persgroep/popular-platform-app/node_modules/@babel/core/lib/transform-ast.js:26:41
    at Generator.next (<anonymous>)
    at evaluateSync (/Users/tijs/projects/persgroep/popular-platform-app/node_modules/gensync/index.js:251:28)

If I remove the import of that file it just fails on something else:

error src/nieuws-wereld/src/common/linking/Navigations.ts: #<WeakSet> could not be cloned.
Error: #<WeakSet> could not be cloned.
    at Object.serialize (node:v8:260:7)
    at _default (/Users/tijs/projects/persgroep/popular-platform-app/node_modules/@babel/core/lib/transformation/util/clone-deep.js:22:34)
    at normalizeFile (/Users/tijs/projects/persgroep/popular-platform-app/node_modules/@babel/core/lib/transformation/normalize-file.js:84:36)
    at normalizeFile.next (<anonymous>)
    at run (/Users/tijs/projects/persgroep/popular-platform-app/node_modules/@babel/core/lib/transformation/index.js:29:50)
    at run.next (<anonymous>)
    at /Users/tijs/projects/persgroep/popular-platform-app/node_modules/@babel/core/lib/transform-ast.js:26:41
    at Generator.next (<anonymous>)
    at evaluateSync (/Users/tijs/projects/persgroep/popular-platform-app/node_modules/gensync/index.js:251:28)

So while I cannot find anything on the particular babel error it seems clear it cannot transform any (or most) files in my project.

I have fixed a lot of other upgrade issues by now (see my other issues on here) but I have not found any solutions (or similar issues on GitHub) for this one... any pointers on where I should be poking are very welcome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions