简体   繁体   中英

Error running rspec in window: Webpack binstubs not found

When I run rspec I get the following error:

C:\Users\Chloe\workspace\catalyst_research>rspec

Randomized with seed 41345
FFFFFFF............................FFFFFFFC:/ruby24/lib/ruby/gems/2.4.0/gems/webpacker-2.0/lib/tasks/installers.rake:1: warning: already initialized constant INSTALLERS
C:/ruby24/lib/ruby/gems/2.4.0/gems/webpacker-2.0/lib/tasks/installers.rake:1: warning: previous definition of INSTALLERS was here
C:/ruby24/lib/ruby/gems/2.4.0/gems/webpacker-2.0/lib/tasks/webpacker/install.rake:1: warning: already initialized constant WEBPACKER_APP_TEMPLATE_PATH
C:/ruby24/lib/ruby/gems/2.4.0/gems/webpacker-2.0/lib/tasks/webpacker/install.rake:1: warning: previous definition of WEBPACKER_APP_TEMPLATE_PATH was here
C:/Users/Chloe/workspace/catalyst_research/lib/tasks/test.rake:6: warning: already initialized constant DRIVERS
C:/Users/Chloe/workspace/catalyst_research/lib/tasks/test.rake:6: warning: previous definition of DRIVERS was here
Webpack binstubs not found.
Make sure the bin directory or binstubs are not included in .gitignore
Exiting!

I do have bin/webpack

C:\Users\Chloe\workspace\catalyst_research>ls bin/webpack
bin/webpack

I did successfully run npm install (with some warnings)

C:\Users\Chloe\workspace\catalyst_research>npm install
npm WARN rollback Rolling back tar-pack@3.4.0 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\Chloe\workspace\catalyst_research\node_modules\fsevents\node_modules'
npm WARN ajv-keywords@3.1.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

up to date in 34.749s

rails test runs nothing:

C:\Users\Chloe\workspace\catalyst_research>rails test
...
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips

rake test gives the same error above. grep webpack .gitignore returns nothing. I'm not very familiar with RSpec. I haven't used it in 5 years. I prefer Minitest because of these incompatibility problems.

  • Rails 5.0.6,
  • RSpec 3.7,
  • Yarn 1.5.1,
  • NPM 5.6.0,
  • Node 9.10.1,
  • Windows 8.1,
  • Ruby 2.4.3,
  • WebPack ~>2.0

I had renamed /bin/webpack-dev-server to bin/webpack-dev-server.rb because it was a Ruby file and wasn't launching in Foreman. When I renamed it back RSpec started working again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM