Skip to content
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

4.1.0 release re-introduces Errno::ENOENT: No such file or directory @ rb_sysopen config/webpacker.yml (#663) #2365

Closed
bjwschaap opened this issue Nov 12, 2019 · 1 comment · Fixed by #2366

Comments

@bjwschaap
Copy link

bjwschaap commented Nov 12, 2019

Latest release re-introduces #663

>> rails webpacker:install
rails webpacker:install
RAILS_ENV=development environment is not defined in config/webpacker.yml, falling back to production environment
rails aborted!
Webpacker configuration file not found /Users/bjwschaap/workspace/devcamp-tutorials/Demo/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/bjwschaap/workspace/devcamp-tutorials/Demo/config/webpacker.yml
/Users/bjwschaap/workspace/devcamp-tutorials/Demo/config/environment.rb:5:in `<main>'
/Users/bjwschaap/workspace/devcamp-tutorials/Demo/bin/rails:9:in `<top (required)>'
/Users/bjwschaap/workspace/devcamp-tutorials/Demo/bin/spring:15:in `require'
/Users/bjwschaap/workspace/devcamp-tutorials/Demo/bin/spring:15:in `<top (required)>'
./bin/rails:3:in `load'
./bin/rails:3:in `<main>'

Caused by:
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/bjwschaap/workspace/devcamp-tutorials/Demo/config/webpacker.yml
/Users/bjwschaap/workspace/devcamp-tutorials/Demo/config/environment.rb:5:in `<main>'
/Users/bjwschaap/workspace/devcamp-tutorials/Demo/bin/rails:9:in `<top (required)>'
/Users/bjwschaap/workspace/devcamp-tutorials/Demo/bin/spring:15:in `require'
/Users/bjwschaap/workspace/devcamp-tutorials/Demo/bin/spring:15:in `<top (required)>'
./bin/rails:3:in `load'
./bin/rails:3:in `<main>'
Tasks: TOP => app:template => environment
(See full trace by running task with --trace)


>> rails webpacker:info
Ruby: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
Rails: 6.0.1
Webpacker: 4.1.0
Node: v12.12.0
Yarn: 1.19.1

@rails/webpacker:
Demo@0.1.0 /Users/bjwschaap/workspace/devcamp-tutorials/Demo
└── (empty)

Is bin/webpack present?: false
Is bin/webpack-dev-server present?: false
Is bin/yarn present?: true

Workaround:
Edit Gemfile:
gem 'webpacker', '4.0.7'
then:
bundle install

After that webpacker:install succeeds:

>> rails webpacker:install
RAILS_ENV=development environment is not defined in config/webpacker.yml, falling back to production environment
      create  config/webpacker.yml
Copying webpack core config
      create  config/webpack
      create  config/webpack/development.js
      create  config/webpack/environment.js
      create  config/webpack/production.js
      create  config/webpack/test.js
Copying postcss.config.js to app root directory
      create  postcss.config.js
Copying babel.config.js to app root directory
      create  babel.config.js
Copying .browserslistrc to app root directory
      create  .browserslistrc
The JavaScript app source directory already exists
       apply  ~/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/webpacker-4.0.7/lib/install/binstubs.rb
  Copying binstubs
       exist    bin
      create    bin/webpack
      create    bin/webpack-dev-server
      append  .gitignore
Installing all JavaScript dependencies [4.0.7]
         run  yarn add @rails/webpacker from "."
yarn add v1.19.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning @rails/webpacker > webpack > watchpack > chokidar > fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
success Saved 600 new dependencies.
info Direct dependencies
├─ @rails/actioncable@6.0.1
├─ @rails/activestorage@6.0.1
├─ @rails/ujs@6.0.1
├─ @rails/webpacker@4.1.0
└─ turbolinks@5.2.0
info All dependencies
├─ @babel/core@7.7.2
├─ @babel/helper-builder-binary-assignment-operator-visitor@7.7.0
├─ @babel/helper-call-delegate@7.7.0
├─ @babel/helper-create-class-features-plugin@7.7.0
├─ @babel/helper-define-map@7.7.0

...

✨  Done in 6.26s.
Webpacker successfully installed 🎉 🍰

>> rails webpacker:info
Ruby: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
Rails: 6.0.1
Webpacker: 4.0.7
Node: v12.12.0
Yarn: 1.19.1

@rails/webpacker:
Demo@0.1.0 /Users/bjwschaap/workspace/devcamp-tutorials/Demo
└── @rails/webpacker@4.1.0

Is bin/webpack present?: true
Is bin/webpack-dev-server present?: true
Is bin/yarn present?: true
@karamat
Copy link

karamat commented Nov 12, 2019

Same Issue I am facing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants