首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我无法在我的Rails应用程序中创建manifest.json

我无法在我的Rails应用程序中创建manifest.json
EN

Stack Overflow用户
提问于 2021-02-07 08:30:27
回答 1查看 174关注 0票数 0

我正在尝试从TheOdinProject启动一个示例rails应用程序。它只创建一个应用程序,为汽车创建一个表,并对其进行迁移。当在本地主机中运行应用程序时,它显示Webpacker::Manifest::MissingEntryError。在启动应用程序时,manifest.json不会被创建。我尝试了互联网上的不同解决方案,包括从头开始删除和重新安装node_modules,实现处理测试的方法,等等。

代码语言:javascript
复制
   {
     "name": "foo",
     "private": true,
     "dependencies": {
       "@rails/actioncable": "^6.0.0",
       "@rails/activestorage": "^6.0.0",
       "@rails/ujs": "^6.0.0",
       "turbolinks": "^5.2.0"
    },
    "version": "0.1.0",
    "devDependencies": {
      "webpack-dev-server": "^3.11.2"
    }
  }

这是我的package.json。我注意到它没有将"@rails/webpacker“作为依赖项。希望你能帮助我。这是我的Gemfile:

代码语言:javascript
复制
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 5.0'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 5.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.4', require: false

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :development do
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
  gem 'web-console', '>= 4.1.0'
  # Display performance information such as SQL time and flame graphs for each request in your browser.
  # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
  gem 'rack-mini-profiler', '~> 2.0'
  gem 'listen', '~> 3.3'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

group :test do
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '>= 3.26'
  gem 'selenium-webdriver'
  # Easy installation and use of web drivers to run system tests with browsers
  gem 'webdrivers'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
EN

回答 1

Stack Overflow用户

发布于 2021-02-07 23:22:32

我找到了问题所在。这是我的节点版本。我使用的是最新版本,但不是LTS,所以没有安装node-sass之类的包。我降级了,现在一切都很好。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66083414

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档