launchPackager.bat throws an error and prevents using the Samples.
I pulled the latest changes from rnwcpp-preview branch, ran npm install and npm run build. Now when I execute .\Scripts\launchPackager.bat I get an error from jest-haset-map "Error: jest-haste-map: @providesModule naming collision:"
The UWP shell builds and launches, but fails to load the js from the metro server. I'm taking a look to try an unblock my investigations, but I wanted to file the issue. If I find what the issue is I will post back here.
Looks like somehow it thinks there is a name collision between the tsx and the js file. I don't think it should be checking for collisions between js a tsx files since the js is the output of trans-piling the tsx file.
Full error text: Loading dependency graph...(node:23912) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision: Duplicate module name: DatePicker Paths: C:\GamingStore\react-native-windows\RNWCPP*lib*Libraries\Components\DatePicker\DatePicker.js* collides with C:\GamingStore\react-native-windows\RNWCPP***\src*Libraries\Components\DatePicker*\DatePicker.tsx**
This error is caused by a @providesModule declaration with the same name across two different files. at setModule (C:\GamingStore\react-native-windows\RNWCPP\node_modules\jest-haste-map\build\index.js:462:17) at workerReply (C:\GamingStore\react-native-windows\RNWCPP\node_modules\jest-haste-map\build\index.js:512:9) at process._tickCallback (internal/process/next_tick.js:68:7) (node:23912) 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: 2) (node:23912) [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.
I'm not able to reproduce this locally. We probably shouldn't even have @providesModule in datepicker since we're not intending to have haste resolution of it, we export datepicker as a react-native-win thing. @acoates-ms may know something
@providesModule is dead. It is no longer used as of 57.
Its possible that the error message still refers to it though. The metro packager shouldn't be looking for ts files.
Did you run install and build from the root or from the RNWCPP directory?
I ran install and build from the RNWCPP directory. Do i need to do root as well?
Thanks for the fast replies!
I can see @providesModule being used here https://github.com/Microsoft/react-native-windows/blob/rnwcpp-preview/RNWCPP/src/Libraries/Components/CalendarView/CalendarView.tsx
@ahimberg @acoates-ms it sounds like this isn't expected?
Fixed after this PR https://github.com/Microsoft/react-native-windows/commit/3fe1d393c20e4d339ceeb1bac0c7822da9123d7e#diff-0833c2188c82c2fa6e73af62256f66e6
Thank you @acoates-ms