在窗口中运行 rspec 时出错:未找到 Webpack binstubs [英] Error running rspec in window: Webpack binstubs not found

查看:41
本文介绍了在窗口中运行 rspec 时出错:未找到 Webpack binstubs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行 rspec 时,出现以下错误:

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!

我有 bin/webpack

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

我确实成功运行了 npm install(有一些警告)

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 什么都不运行:

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

rake test 给出了与上面相同的错误.grep webpack .gitignore 什么都不返回.我对 RSpec 不是很熟悉.我已经 5 年没有使用它了.由于这些不兼容问题,我更喜欢 Minitest.

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,
  • 纱线 1.5.1,
  • NPM 5.6.0,
  • 节点 9.10.1,
  • Windows 8.1,
  • Ruby 2.4.3,
  • WebPack ~>2.0

推荐答案

我已将 /bin/webpack-dev-server 重命名为 bin/webpack-dev-server.rbcode> 因为它是一个 Ruby 文件并且没有在 Foreman 中启动.当我重新将其重命名后,RSpec 又开始工作了.

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.

这篇关于在窗口中运行 rspec 时出错:未找到 Webpack binstubs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆