onmyway133 / notes

:notebook_with_decorative_cover: Issues and solutions I found during development, mostly iOS
https://onmyway133.com/
MIT License
63 stars 4 forks source link

RN: Error: Cannot find module 'jest-haste-map' #360

Open onmyway133 opened 6 years ago

onmyway133 commented 6 years ago
$ /Users/vagrant/git/android/gradlew ":app:assembleRelease"

:react-native-vector-icons:generateReleaseResources
:react-native-vector-icons:packageReleaseResources
:app:mergeReleaseResources
:app:bundleReleaseJsAndAssetsinternal/modules/cjs/loader.js:596
    throw err;
    ^
Error: Cannot find module 'jest-haste-map'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
    at Function.Module._load (internal/modules/cjs/loader.js:520:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/vagrant/git/node_modules/metro-core/src/errors/AmbiguousModuleResolutionError.js:13:33)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Module._compile (/Users/vagrant/git/node_modules/pirates/lib/index.js:91:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Object.newLoader [as .js] (/Users/vagrant/git/node_modules/pirates/lib/index.js:96:7)
    at Module.load (internal/modules/cjs/loader.js:612:32)
 FAILED
onmyway133 commented 6 years ago

npm install jest-haste-map

Cannot find module 'jest-worker'

npm install jest-worker

onmyway133 commented 6 years ago

Cannot find module 'jest-serializer'

onmyway133 commented 6 years ago

https://github.com/expo/expo/issues/854

Loading dependency graph...(node:74975) UnhandledPromiseRejectionWarning: Error: fsevents unavailable (this watcher can only be used on Darwin) at new FSEventsWatcher (/Users/khoa/XcodeProject2/foodshopguest/node_modules/sane/src/fsevents_watcher.js:41:11) at createWatcher (/Users/khoa/XcodeProject2/foodshopguest/node_modules/jest-haste-map/build/index.js:780:23) at Array.map () at HasteMap._watch (/Users/khoa/XcodeProject2/foodshopguest/node_modules/jest-haste-map/build/index.js:936:44) at _buildPromise._buildFileMap.then.then.hasteMap (/Users/khoa/XcodeProject2/foodshopguest/node_modules/jest-haste-map/build/index.js:355:23) at at process._tickCallback (internal/process/next_tick.js:188:7) (node:74975) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:74975) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

onmyway133 commented 6 years ago

Metro Bundler ready.

Loading dependency graph, done. error: bundling failed: Error: While trying to resolve module react-devtools-core from file /Users/khoa/XcodeProject2/foodshopguest/node_modules/react-native/Libraries/Core/Devtools/setupDevtools.js, the package /Users/khoa/XcodeProject2/foodshopguest/node_modules/react-devtools-core/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/Users/khoa/XcodeProject2/foodshopguest/node_modules/react-devtools-core/build/backend.js. Indeed, none of these files exist: