我克隆了gatsby-starter-auth-aws-amplify
(位于https://www.gatsbyjs.org/starters/seabeams/gatsby-starter-auth-aws-amplify/),初始化了存储库并安装了所有依赖项,并不断出现此错误:
无法处理的拒绝无法将以下值创建为TypeComposer: 日期。
Error: Cannot create as TypeComposer the following value: Date.
- SchemaComposer.js:365 SchemaComposer.createTempTC
[gatsby-starter-auth-aws-amplify]/[graphql-compose]/lib/SchemaComposer.js:365: 11
- SchemaComposer.js:563 SchemaComposer.addAsComposer
[gatsby-starter-auth-aws-amplify]/[graphql-compose]/lib/SchemaComposer.js:563: 27
- schema-composer.js:35 createSchemaComposer
[gatsby-starter-auth-aws-amplify]/[gatsby]/dist/schema/schema-composer.js:35:1 8
- index.js:135 Object.build
[gatsby-starter-auth-aws-amplify]/[gatsby]/dist/schema/index.js:135:26
- index.js:418 async module.exports
[gatsby-starter-auth-aws-amplify]/[gatsby]/dist/bootstrap/index.js:418:3
- develop.js:429 async module.exports
[gatsby-starter-auth-aws-amplify]/[gatsby]/dist/commands/develop.js:429:7
有人经历过这个吗?我在github上发现了该错误的几个实例,但是人们发现的解决方案过于针对特定情况而无法应用于我。
答案 0 :(得分:0)
我尝试使用YARN而不是NPM并成功了。确保首先删除node_modules和package.lock文件夹和文件。