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

Example build fails to run #2504

Open
vassantn opened this issue Jun 20, 2024 · 2 comments
Open

Example build fails to run #2504

vassantn opened this issue Jun 20, 2024 · 2 comments

Comments

@vassantn
Copy link

Issue Description

I'm encountering an error when trying to run the example build

/home/user9390/Downloads/react-native-gifted-chat/node_modules/metro/node_modules/jest-haste-map/build/index.js:569
          throw new Error(message);
                ^

Error: jest-haste-map: Haste module naming collision:
  Duplicate module name: react-animated
  Paths: /home/user9390/Downloads/react-native-gifted-chat/node_modules/react-native/Libraries/Animated/release/package.json collides with /home/user9390/Downloads/react-native-gifted-chat/node_modules/expo/node_modules/react-native/Libraries/Animated/release/package.json

This error is caused by `hasteImpl` returning the same name for different files.
    at setModule (/home/user9390/Downloads/react-native-gifted-chat/node_modules/metro/node_modules/jest-haste-map/build/index.js:569:17)
    at workerReply (/home/user9390/Downloads/react-native-gifted-chat/node_modules/metro/node_modules/jest-haste-map/build/index.js:641:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 21756)

Node.js v22.1.0

Steps to Reproduce / Code Snippets

  1. git clone https://github.com/FaridSafi/react-native-gifted-chat
  2. cd react-native-gifted-chat
  3. npm install
  4. expo start

Additional Information

  • Nodejs version: Node.js version: v22.1.0
  • npm version: 8.19.4
@xuelink
Copy link

xuelink commented Jul 7, 2024

facing the same issue

Logs for your project will appear below. Press Ctrl+C to exit.
Failed to construct transformer:  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at stableHash (/Users/xl/Developer/react-native-gifted-chat/example/node_modules/metro-cache/src/stableHash.js:19:8)
    at Object.getCacheKey (/Users/xl/Developer/react-native-gifted-chat/example/node_modules/metro-transform-worker/src/index.js:647:7)
    at getTransformCacheKey (/Users/xl/Developer/react-native-gifted-chat/example/node_modules/metro/src/DeltaBundler/getTransformCacheKey.js:32:19)
    at new Transformer (/Users/xl/Developer/react-native-gifted-chat/example/node_modules/metro/src/DeltaBundler/Transformer.js:180:28)
    at /Users/xl/Developer/react-native-gifted-chat/example/node_modules/metro/src/Bundler.js:58:29
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
  ERROR in ../src/Constant.ts:1
Module not found: Can't resolve 'react-native'
> 1 | import { Platform } from 'react-native'
  2 |
  3 | export const MIN_COMPOSER_HEIGHT = Platform.select({
  4 |   ios: 33,

ERROR in ../src/GiftedChat.tsx 55:7
Module parse failed: Unexpected token (55:7)
File was processed with these loaders:
 * ../../../.nvm/versions/node/v21.1.0/lib/node_modules/expo-cli/node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| dayjs.extend(localizedFormat)
|
> export interface GiftedChatProps<TMessage extends IMessage = IMessage> {
|   /* Message container ref */
|   messageContainerRef?: React.RefObject<FlatList<IMessage>>

ERROR in ../src/utils.ts 14:16
Module parse failed: Unexpected token (14:16)
File was processed with these loaders:
 * ../../../.nvm/versions/node/v21.1.0/lib/node_modules/expo-cli/node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
|
| export function isSameDay(
>   currentMessage: IMessage,
|   diffMessage: IMessage | null | undefined,
| ) {

web compiled with 3 errors and 29 warnings

@cray85
Copy link

cray85 commented Aug 9, 2024

I'm getting the following when trying to run on web..

Error: Cannot find module 'expo/config'

Unable to run on android as well. I get the message

Legacy manifests are no longer supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants