-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Webpacker is breaking webpack #1165
Comments
Did you follow the instruction: Can you show us the repo and how you recreate this? |
No. This is not a Rails specific issue. I’m trying to run webpack in a
completely non Rails, non Ruby context (writing an npm package). Running
`bundle exec rails webpacker:install` will do nothing.
…On Tue, Jan 9, 2018 at 21:06 Bryan Lim ***@***.***> wrote:
Did you follow the instruction: please run 'bundle exec rails
webpacker:install' to install Webpacker with default configs or add the
missing config file for your custom environment.
Can you show us the repo and how you recreate this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1165 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHBFpxwusHJTAD-X9ismx9DKdKYkoG1Iks5tJBszgaJpZM4RYh2l>
.
|
Webpacker is built in/for Ruby/Rails so don't think it will work outside of it. |
If you’re using Bash, your shell may have cached Are you using Bash? If so, add |
Okay, I figured out the cause of the issue. @gauravtiwari, I don't think you understood in the slightest my issue. I am NOT trying to use webpacker outside of Ruby or Rails, I am NOT even trying to use webpacker. I'm simply attempting to use Webpack, good, normal old Webpack, and your gem is breaking that. @georgeclaghorn, thank you for that advice, made me remember that I can just look up the source of the executable with So yeah. Please don't name binstubs common executable names. It just creates a whole bunch of shadowing issues. Granted, I also have an npm issue at hand, but I do think naming your binstubs |
@NicholasLYang Forgive me but this is what you wrote: Comment1:
Comment2:
I hope you understand that the above is not enough information to tell anything about the problem you are having. |
Perhaps, consider uninstalling webpacker gem to remove executables from global namespace?
|
@NicholasLYang Thank you for surfacing this issue. Your suggestions make sense. But, whether it was intended or not, it would be easy to interpret the wording of some of your comments as a bit harsh or, at best, unnecessarily sarcastic. Please consider the maintainers of this project are doing everything they can with what little time they have to help and respond to issues like yours and others as well. |
@gauravtiwari, yes I uninstalled Webpacker. Didn't fix my issue, but at this point, that's not Webpacker's fault, so not going to post it here. I'm not entirely sure how "I'm trying to run webpack in a completely non Rails, non Ruby context" is ambiguous, since I didn't say "I'm trying to run webpacker in a completely non Rails, non Ruby context", which would be rather confusing. Nonetheless, I do see that I was unnecessarily vague in my first post. I'll try to be more clear from now on. To clarify, I was attempting to run Webpack, the Javascript library for bundling, but Webpacker, the Ruby wrapper for the Javascript library, was interfering with it. @rossta Fair point, I'm sorry. I find it very frustrating that a tool that came with Rails is breaking a fair portion of my JavaScript projects. More than a little harmful to productivity. Thank you for all the work you guys put into making Rails great. |
I have this same issue how can i fix it? |
|
@NicholasLYang |
Hello everyone - I've been primarily developing with Ruby/Rails for the past year and encountered the same problem. When I run Edit: I was able to resolve my issue so this does not need a response. |
Is there a way to reset the global reference after uninstall? I uninstalled, but now my webpack projects ignore the webpack entry in their |
@ViggoV The global executables are removed in latest release. You would need to update binstubs after update, please see changelog. bundle update webpacker
yarn add @rails/webpacker
bundle exec rails webpacker:binstubs # should replace old exe |
I think I'm stuck in purgatory. When I try the steps above, I still run into the following when trying to run webpack
|
@pjatx Have you updated the gem to the latest version? (make sure it's has new version specified in Gemfile) |
@gauravtiwari Yeah, this is actually not a rails project as other posters have mentioned. I did uninstall webpacker, then ran into this and did the following with no success:
I didn't, however, specify a version of webpacker. Should I try the above again doing so? |
@pjatx Ahh, sorry totally forgot. Is it possible you might have multiple versions of webpacker installed in different ruby versions? |
@gauravtiwari Yeah it's definitely possible - I use rbenv to as my Ruby version manager |
Curious, "this is actually not a rails project" May I know which ruby project is this? @pjatx update: ok, got you. You used webpacker and it breaks your webpack. |
@ytbryan It's not a ruby project either - it's all javascript / templates. |
This is because you still have the First you need to uninstall Webpacker as it seems to have been installed globally: |
Thanks @renchap that finally fixed my issue! |
Any chance that the rails app's bin/webpack can have a different name so as not to conflict? This one has hit me as well, and many others. |
Yep, this was fixed in 3.3.0: https://github.com/rails/webpacker/blob/3-x-stable/CHANGELOG.md#330---2018-03-03 and PR: #1286 |
run
and run make webpack |
When I run
webpack
, I get the following error:webpack config /Users/nicholas/cs_projects/content-editor/config/webpack/development.js not found, please run 'bundle exec rails webpacker:install' to install Webpacker with default configs or add the missing config file for your custom environment.
This appears to be a webpacker error. Why this is affecting webpack, I have no idea.
The text was updated successfully, but these errors were encountered: