-
Notifications
You must be signed in to change notification settings - Fork 102
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
Assistance Migrating from Haul #8
Comments
I discovered this issue today and is already shipped with the new release |
@zamotany - thanks so much for the quick reply. I was able to get by this after using the steps you provided. The only other issue I came across was another missing dependency I had to install. After installing |
I've updated installation instructions to mention |
Hey @zamotany ,
To start, these are the packages I had in my package.json that I am removing after switching to react-native-webpack-toolkit:
Instead, I now have
The
Now, it looks like:
For what it is worth, our monorepo already has |
First, update Also can you describe your monorepo structure, which dependency manager are you using (yarn, npm etc)? Are you using Lerna? I'll try to recreate your project or you can create it and send me a link to a repro project. Resolution errors like this usually suggest that's webpack cannot find or it's not configured to find the module. |
I updated
A little bit about our structure - We are using rush to manage our monorepo and pnpm as our dependency manager. I wish I could easily send you a repo to reproduce it in, but this is for a company project so I can't link to the repo. If I can't provide enough valuable information for us to figure it out, I will try and create a repo to reproduce this. |
The repro repository would be awesome, but before that there's one thing you can try: https://webpack.js.org/configuration/resolve/#resolvealias and force Webpack to resolve |
@zamotany, I didn't have any luck with the resolve alias. I did create a repo where I hope you can reproduce the issue. The repo is located here. Please use the following steps to reproduce the issue as I have only set this up to happen with this specific build. Also, please note that if you go back a commit you can see that it works when |
@woodrufs Thanks for the repro project. Unfoortunatelly, I got errors when running
Regardless, I did try to run |
@zamotany - Sorry about that. I obviously missed something that my machine still picked up. I am looking into it. The bundle does build correctly. The error occurs once the app is loaded. Looking into this now. |
I see, so I misunderstood the problem. So you can build the bundle without any Haul-related dependencies but it fails to run on simulator/device? |
That is correct. Sorry, I am struggling to get through some eslint errors to make |
So I just ran |
@zamotany,
So, two remaining thoughts:
|
Thanks for the info, I'll take a closer look at it again tomorrow. FYI you can actually put Webpack config in a subdirectory - RNWT has the same resolution as Webpacka CLI: https://www.github.com/callstack/react-native-webpack-toolkit/tree/main/src%2Fcommands%2Futils%2FgetWebpackConfigPath.ts |
Wow, I am embarrassed to admit how long I was overlooking how easy it is to get webpack to look at a different folder. I didn't realize I should put it in a folder specifically called |
Hey @zamotany, |
Not yet, can you remind me which issue is still happening? |
@zamotany,
You then showed me how I was not using the alternate webpack config paths appropriately. After I moved the webpack config to a subdirectory to prevent rush from consuming the webpack config file, rush would then build the project successfully. This addressed point 1 in the comment above. Point 2 in this comment is still an issue. The app will not load after I remove haul from the project. |
@zamotany, if you're still having issues reproducing this in the repo I provided, I can try and create a different repository with the issue. I tried again this morning, and I am still getting the same error. Not trying to be lazy.. Hoping I can help you out with this as your tools are very valuable and appreciated! 😃 |
So @woodrufs, I haven't had time to look more into it, but if you could create more minimalistic/barebone repro project, that would be awesome. I suspect this has something to do with the tooling - rush and pnpm, so the repro project should use that as well. |
@zamotany, I totally get it. I suspect it is the tooling as well. I will try and take some time hopefully within the week to streamline this. A lot of these tools are new to me still, so I am still getting my bearings straight. I think I can give you something that is a little easier to work with. Thank you for the prompt reply. |
@zamotany any headway with things? |
@FrederickEngelhardt Unfortunately no. I don't have experience with this tooling and I'm missing a barebone repro project. |
Closing this due to inactivity, if you need more help @woodrufs feel free to reopen or ping me :) |
Hi All,
Thank you for your work on this library (and Haul)!
I am attempting to transition to this library in an app where we are currently using Haul because of an issue I am having not being able to use flipper (or inspect network requests in Haul's debugger). When I run
npx react-native webpack-start
, the server starts, but the application errors. I am really struggling to get additional data, but all I can pull up right now is this stack trace which appears to be rooting from mywebpack.config.js
:I am using the template webpack.config.js recommended. The only changes I have made were
alias
to ensure all react-native* imports are resolved to the same RN dependency. I am working in a mono repo built with rush, if that helps at all.entry
to./index.js
.Any insight or help is really appreciated. I will include any more information that can be of use... I am feeling so lost right now though, I don't have any more to add.
Thank you in advance!
EDIT: Attaching a screenshot to what I believe my issue is. On line 8, it is requiring the file JsonHelpers, but I do not see that file in
node_modules/webpack/lib/web
.The text was updated successfully, but these errors were encountered: