Nozbe / WatermelonDB

🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️
https://watermelondb.dev
MIT License
10.51k stars 589 forks source link

Test Issues #1050

Closed sidferreira closed 3 years ago

sidferreira commented 3 years ago

@radex I'm having a hard time with some native tests.

yarn test:android  
yarn run v1.22.10
$ cd native/androidTest; ./gradlew connectedAndroidTest
Parallel execution is an incubating feature.

> Configure project :watermelondb
WARNING: API 'variant.getPackageLibrary()' is obsolete and has been replaced with 'variant.getPackageLibraryProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getPackageLibrary(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.

> Task :watermelondb-jsi:externalNativeBuildDebug
Build watermelondb-jsi x86_64
ninja: no work to do.
Build watermelondb-jsi x86
ninja: no work to do.
Build watermelondb-jsi arm64-v8a
ninja: no work to do.
Build watermelondb-jsi armeabi-v7a
ninja: no work to do.

> Task :app:bundleDebugJsAndAssets
warning: the transform cache was reset.
                 Welcome to React Native!
                Learn once, write anywhere

jest-haste-map: Haste module naming collision: @nozbe/watermelondb
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/package.json
    * <rootDir>/dist/package.json

Failed to construct transformer:  DuplicateError: Duplicated files or mocks. Please check the console for more info
    at setModule (.../node_modules/metro/node_modules/jest-haste-map/build/index.js:620:17)
    at workerReply (.../node_modules/metro/node_modules/jest-haste-map/build/index.js:691:9)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 413) {
  mockPath1: 'package.json',
  mockPath2: 'dist/package.json'
}
error Duplicated files or mocks. Please check the console for more info. Run CLI with --verbose flag for more details.
Error: Duplicated files or mocks. Please check the console for more info
    at setModule (.../node_modules/metro/node_modules/jest-haste-map/build/index.js:620:17)
    at workerReply (.../node_modules/metro/node_modules/jest-haste-map/build/index.js:691:9)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 413)

> Task :app:bundleDebugJsAndAssets FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:bundleDebugJsAndAssets'.
> Process 'command 'node'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
90 actionable tasks: 14 executed, 76 up-to-date
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command

it is in the fts branch but I believe the problem is something else...

radex commented 3 years ago
jest-haste-map: Haste module naming collision: @nozbe/watermelondb
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/package.json
    * <rootDir>/dist/package.json

says it right on the tin. rm -fr dist dev should fix it

omangSunday commented 2 years ago

FAILURE: Build failed with an exception.