编辑:我尝试回到已经工作的develop
分支和同一个故事。它一定是node_modules
中的内容吗?
我正在处理KeystoneJS项目。我在其中一个列表中添加了钩子,该项目运行良好。
完成工作后,我将工作pushed
发送到GitHub,并向我的团队提出了请示请求。但是GitHub抱怨一个安全错误(在yarn.lock
中),所以我删除了yarn.lock
,重新安装了node_modules
(yarn
)。但是,当我再次在本地运行项目时,收到以下错误
✔ Validated project entry file ./tsout/index.js
✔ Keystone server listening on port 4545
✔ Initialised Keystone instance
✖ Connecting to database
TypeError: keystone.getResolvers is not a function
at createApolloServer (/Users/r/Documents/projects/yaa-keystone/node_modules/@keystonejs/app-graphql/lib/apolloServer.js:148:25)
at GraphQLApp.prepareMiddleware (/Users/r/Documents/projects/yaa-keystone/node_modules/@keystonejs/app-graphql/index.js:23:20)
at /Users/r/Documents/projects/yaa-keystone/node_modules/@keystonejs/keystone/lib/Keystone/index.js:752:17
at Array.map (<anonymous>)
at Keystone.prepare (/Users/r/Documents/projects/yaa-keystone/node_modules/@keystonejs/keystone/lib/Keystone/index.js:751:12)
at executeDefaultServer (/Users/r/Documents/projects/yaa-keystone/node_modules/@keystonejs/keystone/bin/utils.js:112:42)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
正在node_modules
的梯形失真包内部引发错误。我删除并重新安装了node_modules
,从昨天起将项目还原为可以正常工作的提交,但我仍然遇到相同的错误。
我知道很难说出这个问题是什么,但是在弄清楚如何开始追踪这个问题方面的任何帮助都是有帮助的。
原来是对KeystoneJS的新软件包更新与我的代码冲突,这是一个错误。当我删除yarn.lock
并运行yarn
时,它下载了最新版本。