Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main.jsbundle does not exist. This must be a bug with #35252

Closed
HamjethMisree opened this issue Nov 8, 2022 · 20 comments
Closed

main.jsbundle does not exist. This must be a bug with #35252

HamjethMisree opened this issue Nov 8, 2022 · 20 comments
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@HamjethMisree
Copy link

Description

Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at stableHash (/Users/codelantic/Desktop/CL/spotonpay_mobile/node_modules/metro-cache/src/stableHash.js:19:8)
at JsTransformer.getCacheKey (/Users/codelantic/Desktop/CL/spotonpay_mobile/node_modules/metro/src/JSTransformer/worker.js:478:7)
at getTransformCacheKey (/Users/codelantic/Desktop/CL/spotonpay_mobile/node_modules/metro/src/DeltaBundler/Transformer/getTransformCacheKey.js:39:29)
at new Transformer (/Users/codelantic/Desktop/CL/spotonpay_mobile/node_modules/metro/src/DeltaBundler/Transformer.js:147:28)
at /Users/codelantic/Desktop/CL/spotonpay_mobile/node_modules/metro/src/Bundler.js:54:29 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
error Cannot read properties of undefined (reading 'transformFile'). Run CLI with --verbose flag for more details.
TypeError: Cannot read properties of undefined (reading 'transformFile')
at /Users/codelantic/Desktop/CL/spotonpay_mobile/node_modules/metro/src/Bundler.js:91:34
at Generator.next ()
at asyncGeneratorStep (/Users/codelantic/Desktop/CL/spotonpay_mobile/node_modules/metro/src/Bundler.js:14:24)
at _next (/Users/codelantic/Desktop/CL/spotonpay_mobile/node_modules/metro/src/Bundler.js:34:9)

  • [[ false != true ]]
  • [[ ! -f /Users/codelantic/Library/Developer/Xcode/DerivedData/SpotonPay-ayrwuibscfwqvvfpjawgxchgstzr/Build/Intermediates.noindex/ArchiveIntermediates/SpotonPay/BuildProductsPath/Release-iphoneos/SpotonPay.app/main.jsbundle ]]
  • echo 'error: File /Users/codelantic/Library/Developer/Xcode/DerivedData/SpotonPay-ayrwuibscfwqvvfpjawgxchgstzr/Build/Intermediates.noindex/ArchiveIntermediates/SpotonPay/BuildProductsPath/Release-iphoneos/SpotonPay.app/main.jsbundle does not exist. This must be a bug with'
    error: File /Users/codelantic/Library/Developer/Xcode/DerivedData/SpotonPay-ayrwuibscfwqvvfpjawgxchgstzr/Build/Intermediates.noindex/ArchiveIntermediates/SpotonPay/BuildProductsPath/Release-iphoneos/SpotonPay.app/main.jsbundle does not exist. This must be a bug with
  • echo 'React Native, please report it here: https://github.com/facebook/react-native/issues'
    React Native, please report it here: https://github.com/facebook/react-native/issues
  • exit 2

! Need Help

Version

0.63.4

Output of npx react-native info

System:
OS: macOS 12.5.1
CPU: (8) arm64 Apple M1
Memory: 99.97 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.7.0 - ~/.nvm/versions/node/v18.7.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.7.0/bin/yarn
npm: 8.18.0 - ~/.nvm/versions/node/v18.7.0/bin/npm
Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9014738
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.16 - /usr/bin/javac
Python: Not Found
npmPackages:
@react-native-community/cli: ^4.14.0 => 4.14.0
react: 16.13.1 => 16.13.1
react-native: 0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Hello,

i get this issue when i try to archive my project for testFlight furthermore i have this issues "Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported"..

this is common in android and ios

Snack, code example, screenshot, or link to a repository

Screenshot 2022-11-08 at 11 23 28

@DanielT777
Copy link

Exact same probleme here with M1 Pro, Ventura

Already tried to :
-> Upgrade / Downgrade NodeJS Version
-> Clear pods, yarn cache etc...
-> export NODE_OPTIONS=--openssl-legacy-provider but not really viable and not working on Xcode
-> .....

Tried all things about this problem, still not resolved :/

@AdeelTanveerM
Copy link

Exact same probleme here with M1 Pro, Ventura

Already tried to : -> Upgrade / Downgrade NodeJS Version -> Clear pods, yarn cache etc... -> export NODE_OPTIONS=--openssl-legacy-provider but not really viable and not working on Xcode -> .....

Tried all things about this problem, still not resolved :/

Found any solution ? I am also facing the same issue.

@arlovip
Copy link

arlovip commented Dec 13, 2022

+1

@AdeelTanveerM
Copy link

I have solved this issue by downgrading my Node version to 16.

@vishalhyperspace
Copy link

I have same problem after upgrading please help.

@savithrielangovan
Copy link

I have same problem after upgrading please help.

i have updated my node and xcode still facing same issue

@HenriqueSuel
Copy link

+1

@DanielT777
Copy link

Fixed by adding an alias to my zsh and lauching it when i need to archive an project with this issue:

vim ~/.zshrc

clearwatch() {
 cd /usr/local/var/run/watchman/NAME_OF_YOUR_COMPUTER-state && rm log pid sock state
}

source ~/.zshrc

@alec-c4
Copy link

alec-c4 commented Mar 2, 2023

@DanielT777 what 'bout

clearwatch() {
 rm -rf /usr/local/var/run/watchman/*-state
}

@kelset kelset added Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. and removed 📦Bundler labels Apr 6, 2023
@dulguuned
Copy link

Screenshot 2023-04-28 at 19 17 15
npm start works on vs code cli works but, npm run android opens terminal app of macos does not work for me.
Screenshot 2023-04-28 at 19 18 22

@pascal-maker
Copy link

downgrading to node 16.0 cleared the failed to construct transformer problem.

@adriandiaz
Copy link

I've tried downgrading to 16.0 in addition to everything mentioned on this post, and what I could find on the internet. If anyone has found a solution not mentioned in this post, would greatly appreciate it

@Jamal-ReachFirst
Copy link

solution?

@maxweb4u
Copy link

I had the same problem, when upgrade my node version to the latest - 16.20.1. To fix this problem I've just downgraded to 16.13.0

@pascal-maker
Copy link

I found the solution I upgraded react native to latest version so 0.72 upgraded node js to 20.4 current latest and recrawled watchman I'm using a m1 MacBook Air .

@NSShentu
Copy link

NSShentu commented Aug 1, 2023

Same here!
Now my workaround is add 'export NODE_OPTIONS=--openssl-legacy-provider' to Bundle react native code and image phase, and raise metro by 'yarn start' rather than Xcode run button. And use nvm downgrade node to 16.20.1
Can someone give a better solution?

@Maddumage
Copy link

Maddumage commented Aug 1, 2023

Is there any workable solution for this? I have tried all the solutions suggested above. But still getting the same error. :(

"react-native": "0.64.3",
Node version - 16.20.1

@Maddumage
Copy link

Maddumage commented Aug 1, 2023

Finally, I was able to find the exact reason for my issue.
"NVM is not compatible with the npm config prefix option".

I have solved the problem by downgrading the Node version from 17 to 16 using nvm. Previously had an issue with user PREFIX for the node version. Able to run the project removing the old PREFIX and adding the new Node version PREFIX using nvm commands.

These are the useful links that I have followed.
https://sebhastian.com/nvm-prefix-issue/

https://stackoverflow.com/questions/34718528/nvm-is-not-compatible-with-the-npm-config-prefix-option#:~:text=Delete%20and%20Reset%20the%20prefix&text=Note%3A%20Change%20the%20version%20number,%2D%2Dsilent%22%20to%20unset%20it.

Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 30, 2024
Copy link

github-actions bot commented Feb 8, 2024

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

No branches or pull requests