【发布时间】:2020-04-17 09:07:03
【问题描述】:
我已经尝试了书中感觉的所有内容,但我一直遇到同样的错误。 令人惊讶的是,我在其他任何地方都没有发现这个确切的错误。
remote: error Couldn't find a package.json file in "/tmp/build_0e5b0c14c98db4a63ddfc87fc6d11490"
Here is the full error on Pastebin
Here is the repository for the (rather simple) blogger project
我什至尝试在本地运行 rake assets:precompile 并且绝对没有遇到任何错误。
我跑了RAILS_ENV=production bundle exec rake assets:precompile,推送到我的仓库然后尝试部署,什么都没有。
我搜索了大量 StackOverflow 问题,并尝试在谷歌上搜索我的错误,尝试了我遇到的每个编辑/命令,但没有运气。
编辑:以下是我的 package.json 文件的内容
{
"name": "blogger",
"private": true,
"dependencies": {
"@rails/actioncable": "^6.0.0",
"@rails/activestorage": "^6.0.0",
"@rails/ujs": "^6.0.0",
"@rails/webpacker": "4.2.2",
"turbolinks": "^5.2.0"
},
"version": "0.1.0",
"devDependencies": {
"webpack-dev-server": "^3.10.1"
}
}
【问题讨论】:
-
在 rails 6 的 app 目录中有一个 package.json 文件。它正在查找该文件。
-
我用我的 package.json 文件的内容更新了我的帖子,我不确定它有什么问题
标签: ruby-on-rails ruby heroku