whackage
whackage copied to clipboard
bundling failed
This occurs on react-native run-ios
& react-native run-android
after running whack run start
("start": "node node_modules/react-native/local-cli/cli.js start"
)
Output:
Looking for JS files in
/usr/local/lib/node_modules/whackage/src/packager
Loading dependency graph, done.
::ffff:127.0.0.1 - - [14/Nov/2018:15:38:06 +0000] "GET /onchange HTTP/1.1" - - "-" "
okhttp/3.11.0"
BUNDLE [ios, dev] ../../../../usr/local/lib/node_modules/whackage/src/packager/ind
ex.js ░░░░░░░░░░░░░░░░ 0.0% (0/1)::1 - - [14/Nov/2018:15:38:11 +0000] "GET /index.bu
ndle?platform=ios&dev=true&minify=false HTTP/1.1" 200 - "-" "foo/1 CFNetw
error: bundling failed: Error: The resource `/usr/local/lib/node_modules/whackage/sr
c/packager/index.js` was not found.
at /foo/node_modules/metro/src/IncrementalBundler.js
:122:24
at gotStat (fs.js:1775:21)
at /foo/node_modules/graceful-fs/polyfills.js:282:31
at FSReqWrap.oncomplete (fs.js:152:21)
BUNDLE [ios, dev] ../../../../usr/local/lib/node_modules/whackage/src/packager/ind
ex.js ░░░░░░░░░░░░░░░░ 0.0% (0/1), failed.
Output on Emulator:
Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(The resource `/usr/local/lib/node_modules/whackage/src/packager/index.js` was not found. (null))
__38-[RCTCxxBridge loadSource:onProgress:]_block_invoke.248
RCTCxxBridge.mm:429
___ZL36attemptAsynchronousLoadOfBundleAtURLP5NSURLU13block_pointerFvP18RCTLoadingProgressEU13block_pointerFvP7NSErrorP9RCTSourceE_block_invoke.118
__80-[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:]_block_invoke
-[RCTMultipartStreamReader emitChunk:headers:callback:done:]
-[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:]
-[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:]
__88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke
__NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
-[NSBlockOperation main]
-[__NSOperationInternal _start:]
__NSOQSchedule_f
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_continuation_pop
_dispatch_async_redirect_invoke
_dispatch_root_queue_drain
_dispatch_worker_thread2
_pthread_wqthread
start_wqthread
@rkhayat I believe that's the same issue I ran into with RN 0.57.x. Try this: https://github.com/dphaener/whackage/tree/react-native-57-updates and see if it works for you. That fixes RN 0.57.x compatibility issues.
This would fix it: https://github.com/FormidableLabs/whackage/pull/31.
Not sure if the maintainers are paying attention.... ;)
@rkhayat The crux of it is:
Looking for JS files in
/usr/local/lib/node_modules/whackage/src/packager
The newest version of Metro bundler needs the projectRoot
explicitly set, as far as I can tell.
Waiting for an update on this.