profile
viewpoint

Ask questionsError: Cannot create as TypeComposer the following value: Date.

<!-- Please fill out each section below, otherwise your issue will be closed. This info allows Gatsby maintainers to diagnose (and fix!) your issue as quickly as possible.

Useful Links:

  • Documentation: https://www.gatsbyjs.org/docs/
  • How to File an Issue: https://www.gatsbyjs.org/contributing/how-to-file-an-issue/

Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues -->

Description

Can't launch Dev Server. I just get Error: Cannot create as TypeComposer the following value: Date.

  • SchemaComposer.js:313 SchemaComposer.createTempTC [restaurant]/[graphql-compose]/lib/SchemaComposer.js:313:11

  • SchemaComposer.js:511 SchemaComposer.addAsComposer [restaurant]/[graphql-compose]/lib/SchemaComposer.js:511:27

  • schema-composer.js:21 createSchemaComposer [restaurant]/[gatsby]/dist/schema/schema-composer.js:21:18

  • index.js:42 Object.<anonymous> [restaurant]/[gatsby]/dist/schema/index.js:42:28

  • Generator.next

  • new Promise

  • index.js:65 Object.build [restaurant]/[gatsby]/dist/schema/index.js:65:17

  • index.js:341 [restaurant]/[gatsby]/dist/bootstrap/index.js:341:32

  • Generator.next

Steps to reproduce

gatsby, gatsby new , gatsbystarter, gatsby-plugin-less less, gatsby-plugin-contentful. Should be able to launch dev server

Expected result

should be able to launch dev server. I seem to have conflicting packages. npm WARN @gatsbyjs/relay-compiler@2.0.0-printer-fix.2 requires a peer of graphql@^14.1.0 but none is installed. You must install peer dependencies yourself. npm WARN babel-plugin-remove-graphql-queries@2.6.3 requires a peer of graphql@^14.1.1 but none is installed. You must install peer dependencies yourself. npm WARN ts-pnp@1.0.1 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.

yet if I download those i then get below npm WARN eslint-plugin-graphql@2.1.1 requires a peer of graphql@^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself. npm WARN express-graphql@0.6.12 requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself. npm WARN graphql-tools@3.1.1 requires a peer of graphql@^0.13.0 but none is installed. You must install peer dependencies yourself. npm WARN ts-pnp@1.0.1 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.

It's like certain depend require graphql@14.1.0 and the others require graphql@0.12.0 What should happen? I'm just super frustrated. hopefully, Someone can help me out. I've deleted node_modules and package-lock.json. I've cleared .cache, npm clear cache, i've uninstalled and reinstalled node it's self. I'm totally at a loss. even others far more experienced than myself can't seem to help me. Just to clarify totally not upset with anyone I just want this to work. my productivity has went to nothing as I've been trying to finish up this project. as it stands I can't do anything. Thanks all for your help

Actual result

failed. UNHANDLED REJECTION Error: Cannot create as TypeComposer the following value: Date.

What happened. Think it's just a issue of peer wanting 13 and another wanting 14. but don't know how to fix

Environment

mac mojave. v 10.14.4 node v 11.13.0

{ "name": "gatsby-starter-default", "private": true, "description": "A simple starter to get up and developing quickly with Gatsby", "version": "0.1.0", "author": "Kyle Mathews mathews.kyle@gmail.com", "dependencies": { "@babel/cli": "^7.4.3", "@babel/core": "^7.4.3", "babel-cli": "^6.26.0", "gatsby": "^2.3.17", "gatsby-image": "^2.0.37", "gatsby-plugin-less": "^2.0.12", "gatsby-plugin-manifest": "^2.0.29", "gatsby-plugin-offline": "^2.0.25", "gatsby-plugin-react-helmet": "^3.0.12", "gatsby-plugin-sharp": "^2.0.33", "gatsby-source-contentful": "^2.0.47", "gatsby-source-filesystem": "^2.0.29", "gatsby-transformer-sharp": "^2.1.17", "graphql": "^14.2.1", "less": "^3.9.0", "prop-types": "^15.7.2", "react": "^16.8.6", "react-dom": "^16.8.6", "react-helmet": "^5.2.0", "react-icons": "^3.5.0" }, "devDependencies": { "prettier": "^1.16.4" }, "keywords": [ "gatsby" ], "license": "MIT", "scripts": { "build": "gatsby build", "develop": "gatsby develop", "format": "prettier --write src/**/*.{js,jsx}", "start": "npm run develop", "serve": "gatsby serve", "test": "echo "Write tests! -> https://gatsby.dev/unit-testing"" }, "repository": { "type": "git", "url": "https://github.com/gatsbyjs/gatsby-starter-default" }, "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" } }

Run gatsby info --clipboard in your project directory and paste the output here.

System: OS: macOS 10.14.4 CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Shell: 5.3 - /bin/zsh Binaries: Node: 11.13.0 - /usr/local/bin/node Yarn: 1.15.2 - /usr/local/bin/yarn npm: 6.7.0 - /usr/local/bin/npm Languages: Python: 2.7.10 - /usr/bin/python Browsers: Chrome: 73.0.3683.103 Firefox: 66.0.2 Safari: 12.1 npmPackages: gatsby: ^2.3.17 => 2.3.17 gatsby-image: ^2.0.37 => 2.0.37 gatsby-plugin-less: ^2.0.12 => 2.0.12 gatsby-plugin-manifest: ^2.0.29 => 2.0.29 gatsby-plugin-offline: ^2.0.25 => 2.0.25 gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12 gatsby-plugin-sharp: ^2.0.33 => 2.0.33 gatsby-source-contentful: ^2.0.47 => 2.0.47 gatsby-source-filesystem: ^2.0.29 => 2.0.29 gatsby-transformer-sharp: ^2.1.17 => 2.1.17 npmGlobalPackages: gatsby-cli: 2.5.5

Jon @bangarangler@gmail.com slack: @bangarangler @dain.palacio@gmail.com

gatsbyjs/gatsby

Answer questions DWboutin

Hi! I got the problem when trying to build. I created this small repo for you to test it out. Very minimal of our setup.

I tried to disable all gatsby-plugins, but it throws the same error.

https://github.com/MikaelConecto/build-fails

npm start

> gatsby-starter-default@0.1.0 start /Users/mikaelboutin/Desktop/conecto/gatsby-bug
> npm run develop


> gatsby-starter-default@0.1.0 develop /Users/mikaelboutin/Desktop/conecto/gatsby-bug
> gatsby develop

⠁ Using environment config: 'development'
success open and validate gatsby-configs — 0.010 s
success load plugins — 0.317 s
success onPreInit — 0.003 s
success initialize cache — 0.010 s
success copy gatsby files — 0.033 s
success onPreBootstrap — 0.005 s
success source and transform nodes — 0.039 s
error UNHANDLED REJECTION


  Error: Cannot add as Composer type following value: Date.
  
  - SchemaComposer.js:391 SchemaComposer.addAsComposer
    [gatsby-bug]/[graphql-compose]/lib/SchemaComposer.js:391:11
  
  - schema-composer.js:21 createSchemaComposer
    [gatsby-bug]/[gatsby]/dist/schema/schema-composer.js:21:18
  
  - index.js:42 Object.<anonymous>
    [gatsby-bug]/[gatsby]/dist/schema/index.js:42:28
  
  - Generator.next
  
  - new Promise
  
  - index.js:65 Object.build
    [gatsby-bug]/[gatsby]/dist/schema/index.js:65:17
  
  - index.js:341 
    [gatsby-bug]/[gatsby]/dist/bootstrap/index.js:341:32
  
  - Generator.next

I just removed all Gatsby plugins and it does the same.

useful!

Related questions

Importing Link from gatsby breaks Storybook hot 2
Loading chunks while a new release is deployed hot 2
Webpack error #98123 when running "gatsby develop" hot 2
gatsby build error #11328 A page component must export a React component for it to be valid. Please make sure this file exports a React component: /Users/tiagosanchez/Documents/Projects/personalBlog/node_modules/gatsby-plugin-offline/app-shell.js hot 2
[gatsby-telemetry] error: src/postinstall.js not found in Linux environments hot 2
IE11: Object not valid as React Child hot 2
CircleCI build Error: spawn ENOMEM hot 2
[Help] I somehow managed to butcher my site's performance hot 2
Build gets stuck at Generating image thumbnails / Update schema on large sites hot 2
[gatsby-source-graphql] Shopify GraphQL Schema Error hot 2
UNHANDLED REJECTION Source and destination must not be the same. hot 2
gatsby-source-shopify unable to complete build hot 2
Gatsby's Use Of Polyfills and the 'Missing Resources for x' error hot 2
Autoprefixer "browsers" option is deprecated in v9, produces warnings hot 2
&#39;gatsby&#39; is not recognized as an internal or external command hot 2
Github User Rank List