-
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
Command "webpack-dev-server" not found. #506
Comments
@luispcosta Is webpacker installed i.e. |
You're right. What do I have to do to have Edit: Actually I do have the |
@luispcosta you should do Because Therefore, rails:webpacker:install not called. Therefore you don't have a config/webpack. |
Thanks @ytbryan. @luispcosta as suggested could you please re-run |
Also could you please check your |
* webpack or webpack-dev-server not found Add to troubleshooting of readme to prevent such issues #379 (comment), #506 * Update README.md * Update README.md * Include solution for error occurring in heroku * Update README.md Since it is known that node buildpacks is not necessary Read: #522 (comment) * Update README.md * Update README.md Include instruction while upgrading from rails 4 to 5. * Minor update * Use ./bin/rails * Add as comment
@luispcosta Does the above suggestions work? |
Hey @gauravtiwari . Sorry for the late response, but no, it didn't work :\ I had the |
@luispcosta can you push that fresh rails project on github ? and share with us? |
@ytbryan Sure, I can do it, but I can only do it later today. I'll ping here when I do it |
@luispcosta Seems like something to do with node or yarn. Are you able to manually run those executables? - |
@luispcosta Were you able to get this to work? |
I know this issue was closed, but I had the same problem. In my case, the commands to configure |
@frenangomes Yes if you have run |
@gauravtiwari I had executed I think the solution is this PR that was mentioned here. I didn't see it, my bad 😞 . I'll try it later. |
I had this same problem (randomly - on a project that had been working fine for months) - I think it had something to do with npm messing up my node_modules. Running |
I have the same issue on docker. When I am on linux machine, everything works. On macOS, it does not. From my
ruby '2.4.1' I created new app with
|
@hovancik Could you please remove |
Also you may want to use latest master where we have removed Note: Also re-update webpacker.yml if you have changed the defaults after upgrade :) |
Thanks, works now with new yarn install. |
* webpack or webpack-dev-server not found Add to troubleshooting of readme to prevent such issues rails/webpacker#379 (comment), rails/webpacker#506 * Update README.md * Update README.md * Include solution for error occurring in heroku * Update README.md Since it is known that node buildpacks is not necessary Read: rails/webpacker#522 (comment) * Update README.md * Update README.md Include instruction while upgrading from rails 4 to 5. * Minor update * Use ./bin/rails * Add as comment
I have installed yarn, foreman and also added it in Gemfile. When I run foreman start its showing error. I have been trying from 4 days couldn't find any solution to help me to fix this. Please help me!!!!!!!!!!!!! C:\Sites\shine>foreman start |
Have you installed webpacker after adding to your Gemfile?
|
@gauravtiwari Yes I had executed the same command and when I run foreman start still getting the same error. Attached image after executing bundle exec rails webpacker:install |
What happens if you run |
@gauravtiwari I executed the command you sent the result is attached below |
Ahh right so it's there. Could you please run it like so: |
@gauravtiwari It's throwing some error as; |
Ahh right so it seems you got the latest dev server installed which is only works with 4.0. Please could you do: |
I executed yarn add [email protected] it installs few packages. Then I executed ruby ./bin/webpack-dev-server it runs successfully. Then I run foreman start still its showing same error. |
What error are you getting with |
@gauravtiwari I changed my Procfile as |
Looks like there is some syntax error in Gemfile on line 13. |
@gauravtiwari At line 13 there was gem 'devise'. I removed it and run foreman start now its showing But localhost:5000 not working in browser |
What happens if you run |
@gauravtiwari bundle exec rails s is working fine after removing gem 'devise'. I can open localhost:3000 in browser successfully. But when I add gem 'devise' in Gem file, if i run bundle exec rails s it's showing errors as |
Not sure what's wrong there. Can you manually type gem 'devise' into your Gemfile? (make sure quotes are correct) |
@gauravtiwari I changed its position i.e., after gem 'rails' and run bundle install. Now bundle exec rails s is working fine. |
Facing the same issue. Any solution to this? |
Could you please make an example repo? |
https://bitbucket.org/abineetds/qiggleonrails |
@abineetds could you find a solution for your issue? I have exactly the same issue in Windows 10 machine too |
Sadly no. Just not using hot reloading at the moment. Slow, but works. |
@abineetds Are you able to run webpack dev server without foreman?
|
Yes it does run, but on navigating to localhost:3035, I get what looks like a routing error. no GET for /. Now what I see is this:
|
You don't need to go to Run following in separate terminal windows (without foreman):
Navigate to The home views should load javascript/packs if you have included |
Have you tried invoker or https://github.com/ddollar/forego on windows? |
Hey @gauravtiwari, That actually worked. I'm just running Thanks a ton! I'll try out your other recommendations too. @juantoniomac This might work for you. |
Interestingly, this issue was closed but recently sprang to life, and I am having a similar problem (really more of "syndrome") which I have reported in this issue: #1419 |
I was missing a Running "dependencies": {
"@rails/webpacker": "3.5"
},
"devDependencies": {
"webpack-dev-server": "2.11.2"
} and then |
That worked fine to me, Thanks. What's the login here? I'm using rails 5.2.2 and I thought |
for me command |
When I run this it says no such file or directory. Any idea what I should do? Thanks |
Install webpacker in dependencies instead of devDependencies per rails/webpacker#506 (comment)
* webpack or webpack-dev-server not found Add to troubleshooting of readme to prevent such issues rails/webpacker#379 (comment), rails/webpacker#506 * Update README.md * Update README.md * Include solution for error occurring in heroku * Update README.md Since it is known that node buildpacks is not necessary Read: rails/webpacker#522 (comment) * Update README.md * Update README.md Include instruction while upgrading from rails 4 to 5. * Minor update * Use ./bin/rails * Add as comment
* webpack or webpack-dev-server not found Add to troubleshooting of readme to prevent such issues rails/webpacker#379 (comment), rails/webpacker#506 * Update README.md * Update README.md * Include solution for error occurring in heroku * Update README.md Since it is known that node buildpacks is not necessary Read: rails/webpacker#522 (comment) * Update README.md * Update README.md Include instruction while upgrading from rails 4 to 5. * Minor update * Use ./bin/rails * Add as comment
It's 2023 and I'm having this problem and I still can't solve it. Even the npm install webpack-dev-server -g suggestion didn't work. project: |
I'm trying to create a new project with
webpacker
in rails and I constantly get the errorWhen trying to launch the dev server.
Run down of the commands:
System configuration
5.1.1
2.4.1p111
v6.10.2
v0.24.6
I'm also running this on a Vagrant machine with the version
1.9.3
I tried doing:
Nothing seems to work. Any help?
Thanks!
The text was updated successfully, but these errors were encountered: