生产中缺少字段类型

时间:2018-09-04 12:43:45

标签: heroku keystonejs

生产服务器上的某些字段类型存在问题。某些字段类型丢失,导致尝试列出所有项目时管理界面崩溃。到目前为止,我们遇到问题的字段是DateCloudinaryImages(请注意,DateTimeCloudinaryImage可以正常工作)。

在检查登台服务器上的源代码并将其与生产服务器进行比较时,我们在编译的js文件中看到以下差异:

example.com/js/fields.js关于登台

exports.Fields = {
  text: require("types/text/TextField"),
  textarea: require("types/textarea/TextareaField"),
  html: require("types/html/HtmlField"),
  cloudinaryimage: require("types/cloudinaryimage/CloudinaryImageField"),
  select: require("types/select/SelectField"),
  relationship: require("types/relationship/RelationshipField"),
  datetime: require("types/datetime/DatetimeField"),
  boolean: require("types/boolean/BooleanField"),
  embedly: require("types/embedly/EmbedlyField"),
  cloudinaryimages: require("types/cloudinaryimages/CloudinaryImagesField"),
  numberarray: require("types/numberarray/NumberArrayField"),
  code: require("types/code/CodeField"),
  number: require("types/number/NumberField"),
  textarray: require("types/textarray/TextArrayField"),
  url: require("types/url/UrlField"),
  file: require("types/file/FileField"),
  email: require("types/email/EmailField"),
  name: require("types/name/NameField"),
  password: require("types/password/PasswordField")
};
制作中的

example.com/js/fields.js

exports.Fields = {
  text: require("types/text/TextField"),
  textarea: require("types/textarea/TextareaField"),
  html: require("types/html/HtmlField"),
  cloudinaryimage: require("types/cloudinaryimage/CloudinaryImageField"),
  select: require("types/select/SelectField"),
  relationship: require("types/relationship/RelationshipField"),
  datetime: require("types/datetime/DatetimeField"),
  boolean: require("types/boolean/BooleanField"),
  embedly: require("types/embedly/EmbedlyField"),
  numberarray: require("types/numberarray/NumberArrayField"),
  code: require("types/code/CodeField"),
  number: require("types/number/NumberField"),
  textarray: require("types/textarray/TextArrayField"),
  url: require("types/url/UrlField"),
  file: require("types/file/FileField"),
  email: require("types/email/EmailField"),
  name: require("types/name/NameField"),
  password: require("types/password/PasswordField")
};

老鹰眼的读者可以看到登台服务器上有cloudinaryimages: require("types/cloudinaryimages/CloudinaryImagesField"),,而生产服务器上没有。 Date根本没有出现,也许是因为上次遇到此问题时我们使用该类型删除了所有字段吗?

我们的网站托管在Heroku上。我们尝试禁用节点缓存和重建。我们尝试将分阶段构建推广到生产。问题仍然存在。我们的生产服务器的环境设置为production

fields.js文件的构建是否取决于我们使用的字段?以及我们的生产服务器为何无法获得它们?

任何帮助表示赞赏。

主要版本:4.0.0-beta.8 (分叉了一些与此无关的东西)

0 个答案:

没有答案