Can't launch Dev Server. I just get Error: Cannot create as TypeComposer the following value: Date.
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.
[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
gatsby, gatsby new , gatsbystarter, gatsby-plugin-less less, gatsby-plugin-contentful. Should be able to launch dev server
should be able to launch dev server. I seem to have conflicting packages.
npm WARN @gatsbyjs/[email protected] requires a peer of graphql@^14.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^14.1.1 but none is installed. You must install peer dependencies yourself.
yet if I download those i then get below
npm WARN [email protected] requires a peer of graphql@^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] 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 [email protected] requires a peer of graphql@^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
It's like certain depend require [email protected] and the others require [email protected]
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
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
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
@[email protected]
slack: @bangarangler
@dain.[email protected]
This error message means that you have conflicting graphql
packages.
Steps to reproduce
gatsby, gatsby new , gatsbystarter, gatsby-plugin-less less, gatsby-plugin-contentful.
Could you provide clear steps how to reproduce the error? Thanks!
Yes but it would seem that 2 different required packages both require
conflicting versions. So I'm not sure how to fix. One wants 0.13.0 and
another requires 14.0.1
On Thu, Apr 11, 2019, 9:29 AM stefanprobst notifications@github.com wrote:
This error message means that you have conflicting graphql packages.
Steps to reproduce
gatsby, gatsby new , gatsbystarter, gatsby-plugin-less less,
gatsby-plugin-contentful.Could you provide clear steps how to reproduce the error? Thanks!
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gatsbyjs/gatsby/issues/13278#issuecomment-482114044,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AnL5bSizQt25ceQMOD9sBQMoSSdTPo9Mks5vfzivgaJpZM4cov6F
.
Please feel free to delete this post. There was a random string hidden in the bottom corner of the file. no idea how or why it got there. 200Bb that seemed to be causing all of the issues. Thank you very much for your assistance. While porting things over I was able to catch that remove it and things are as they should be. Thank you again. Very sorry for the trouble
@bangarangler, After updating deps, I'm having exactly the same issue, but in a Windows (WSL) environment.
Can you explain how you fixed the issue?
I'm still getting the same error message. however, somehow I had some
random string of numbers in one of my component files. I would comb through
your code real quick and see if anything is hiding that shouldn't be there.
once you do that I would double check your package.json to make sure you
have everything you need and the dump the node modules and package.lock
file. npm install everything and you should be good to go. I still have
those errors but they were not stopping the dev server from running. That
was those randomly generated numbers and letters I found lurking in my
code. no idea how they got there. I hope this helps. please let us know!
On Fri, Apr 12, 2019 at 12:52 PM Leo Furze-Waddock notifications@github.com
wrote:
@bangarangler https://github.com/bangarangler, After updating deps, I'm
having exactly the same issue, but in a Windows (WSL) environment.Can you explain how you fixed the issue?
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gatsbyjs/gatsby/issues/13278#issuecomment-482646013,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AnL5bUYd_D0EQAwVOW4xItaE5zKIjRY4ks5vgLnlgaJpZM4cov6F
.
Thanks for your response @bangarangler.
It's just started working for me too, but I'm not sure I actually made any changes that fixed it, which included running npm cache verify
and repeatedly deleting the .cache
and node_modules
folders before npm installing, but never tried deleting package-lock.json
.
I reverted to a working set-up committed prior to updating deps and ran into an issue with a [email protected] postinstall test/compilation error. This was strange because I hadn't noticed this problem before. I fixed that by installing some missing Ubuntu packages.
sudo apt install autoconf libtool pkg-config nasm build-essential
Even then, I ran into another strange issue when running gatsby develop
, as it failed with error;
run graphql queriesnode: symbol lookup error: node_modules/sharp/build/Release/sharp.node: undefined symbol:
So I tried updating deps again, then immediately deleted both node_modules
and .cache
folders before running npm i
. This time it worked and it did not warn me about any missing peer dependencies, just some warnings about fsevents
which I can ignore as I'm not on a Mac. You can see the output below.
SysMan@HP-Z820-GJ7MQ:/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure$ rm -rf .cache
SysMan@HP-Z820-GJ7MQ:/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure$ rm -rf node_modules
SysMan@HP-Z820-GJ7MQ:/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure$ npm i
> [email protected] install /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/gatsby-plugin-manifest/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Using cached /home/SysMan/.npm/_libvips/libvips-8.7.0-linux-x64.tar.gz
> [email protected] install /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Using cached /home/SysMan/.npm/_libvips/libvips-8.7.0-linux-x64.tar.gz
> [email protected] postinstall /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/gatsby-telemetry
> node src/postinstall.js
> [email protected] postinstall /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/cwebp-bin
> node lib/install.js
β cwebp pre-build test passed successfully
> [email protected] postinstall /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/mozjpeg
> node lib/install.js
β mozjpeg pre-build test passed successfully
> [email protected] postinstall /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/pngquant-bin
> node lib/install.js
β pngquant pre-build test passed successfully
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EINVAL: invalid argument, scandir '/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/fsevents/node_modules'
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EINVAL: invalid argument, lstat '/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/fsevents/node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1863 packages from 1049 contributors and audited 26178 packages in 153.705s
found 0 vulnerabilities
SysMan@HP-Z820-GJ7MQ:/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure$ npm run develop
> [email protected] develop /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure
> gatsby develop
success open and validate gatsby-configs β 0.013 s
success load plugins β 5.931 s
success onPreInit β 0.040 s
success initialize cache β 0.021 s
success copy gatsby files β 0.492 s
success onPreBootstrap β 0.013 s
success source and transform nodes β 0.333 s
success building schema β 0.571 s
success createPages β 0.002 s
success createPagesStatefully β 0.114 s
success onPreExtractQueries β 0.010 s
success update schema β 0.045 s
success extract queries from components β 0.182 s
success run graphql queries β 1.362 s β 8/8 5.89 queries/second
success write out page data β 0.034 s
success write out redirect data β 0.004 s
Generating image thumbnails [==============================] 36/36 8.3 secs 100%
success Build manifest and related icons β 0.386 s
success onPostBootstrap β 0.394 s
info bootstrap finished - 44.973 s
DONE Compiled successfully in 16437ms
You can now view client-get-tech-gatsby-project-brochure in the browser.
http://localhost:8000/
View GraphiQL, an in-browser IDE, to explore your site's data and schema
http://localhost:8000/___graphql
Note that the development build is not optimized.
To create a production build, use npm run build
βΉ ο½’wdmο½£:
βΉ ο½’wdmο½£: Compiled successfully.
I'm guessing this is a race condition in npm which fails intermittently to install all deps and peer deps in the correct order.
Anyway, its working now so I'm not going to touch anything for a while.
Lol. Yes I thought the exact same thing! I'm glad you got it working man.
Between that and Babel moving to 7 it's been a ruff week. Wishing you well
friend! Happy coding ππ©π
On Fri, Apr 12, 2019, 5:18 PM Leo Furze-Waddock notifications@github.com
wrote:
Thanks for your response @bangarangler https://github.com/bangarangler.
It's just started working for me too, but I'm not sure I actually made any
changes that fixed it, which included running npm cache verify and
repeatedly deleting the .cache and node_modules folders before npm
installing, but never tried deleting package-lock.json.I reverted to a working set-up committed prior to updating deps and ran
into an issue with a [email protected] postinstall test/compilation error.
This was strange because I hadn't noticed this problem before. I fixed that
by installing some missing Ubuntu packages.sudo apt install autoconf libtool pkg-config nasm build-essential
Even then, I ran into another strange issue when running gatsby develop,
as it failed with error;run graphql queriesnode: symbol lookup error: node_modules/sharp/build/Release/sharp.node: undefined symbol:
So I tried updating deps again, then immediately deleted both node_modules
and .cache folders before running npm i. This time it worked and it did
not warn me about any missing peer dependencies, just some warnings about
fsevents which I can ignore as I'm not on a Mac. You can see the output
below.SysMan@HP-Z820-GJ7MQ:/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure$ rm -rf .cache
SysMan@HP-Z820-GJ7MQ:/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure$ rm -rf node_modules
SysMan@HP-Z820-GJ7MQ:/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure$ npm i
[email protected] install /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/gatsby-plugin-manifest/node_modules/sharp
(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Using cached /home/SysMan/.npm/_libvips/libvips-8.7.0-linux-x64.tar.gz
[email protected] install /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/sharp
(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Using cached /home/SysMan/.npm/_libvips/libvips-8.7.0-linux-x64.tar.gz
[email protected] postinstall /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/gatsby-telemetry
node src/postinstall.js
[email protected] postinstall /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/cwebp-bin
node lib/install.js
β cwebp pre-build test passed successfully
[email protected] postinstall /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/mozjpeg
node lib/install.js
β mozjpeg pre-build test passed successfully
[email protected] postinstall /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/pngquant-bin
node lib/install.js
β pngquant pre-build test passed successfully
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EINVAL: invalid argument, scandir '/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/fsevents/node_modules'
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EINVAL: invalid argument, lstat '/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure/node_modules/fsevents/node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1863 packages from 1049 contributors and audited 26178 packages in 153.705s
found 0 vulnerabilities
SysMan@HP-Z820-GJ7MQ:/mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure$ npm run develop
[email protected] develop /mnt/d/Projects/Brochure/client-get-tech-gatsby-project-brochure
gatsby develop
success open and validate gatsby-configs β 0.013 s
success load plugins β 5.931 s
success onPreInit β 0.040 s
success initialize cache β 0.021 s
success copy gatsby files β 0.492 s
success onPreBootstrap β 0.013 s
success source and transform nodes β 0.333 s
success building schema β 0.571 s
success createPages β 0.002 s
success createPagesStatefully β 0.114 s
success onPreExtractQueries β 0.010 s
success update schema β 0.045 s
success extract queries from components β 0.182 s
success run graphql queries β 1.362 s β 8/8 5.89 queries/second
success write out page data β 0.034 s
success write out redirect data β 0.004 s
Generating image thumbnails [==============================] 36/36 8.3 secs 100%
success Build manifest and related icons β 0.386 s
success onPostBootstrap β 0.394 s
info bootstrap finished - 44.973 s
DONE Compiled successfully in 16437ms
You can now view client-get-tech-gatsby-project-brochure in the browser.
http://localhost:8000/
View GraphiQL, an in-browser IDE, to explore your site's data and schema
http://localhost:8000/___graphql
Note that the development build is not optimized.
To create a production build, use npm run build
βΉ ο½’wdmο½£:
βΉ ο½’wdmο½£: Compiled successfully.
I'm guessing this is a race condition in npm which fails intermittently to
install all deps and peer deps in the correct order.Anyway, its working now so I'm not going to touch anything for a while.
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gatsbyjs/gatsby/issues/13278#issuecomment-482726299,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AnL5bT8GwTXEOSO9L9YLif7AuIrCc9i0ks5vgPgqgaJpZM4cov6F
.
Following the Netlifcy CMS instructions for gatsby start replcaies this issue
https://www.netlifycms.org/docs/gatsby
gatsby develop
success open and validate gatsby-configs β 0.015 s
success load plugins β 0.685 s
success onPreInit β 0.005 s
success initialize cache β 0.018 s
success copy gatsby files β 0.088 s
warning gatsby-plugin-feed was initialized in gatsby-config.js without a feeds option.
This means that we the plugin will use the internal RSS feed creation, which may not match your use case.
This behavior will be removed in the next major release of gatsby-plugin-feed.
For more info, check out: https://gatsby.app/adding-rss-feed
success onPreBootstrap β 0.014 s
success source and transform nodes β 0.100 s
error UNHANDLED REJECTION
Error: Cannot create as TypeComposer the following value: Date.
@john20xdoe This error message usually means that there are conflicting graphql
packages. Could you please provide steps to reproduce the error? Thanks!
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
> [email protected] start /Users/mikaelboutin/Desktop/conecto/gatsby-bug
> npm run develop
> [email protected] 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.
I created a new project, Installed all deps one by one, copied .src folder and it build now! I really don't understand a thing in this problem.
@DWboutin Thanks for the repo! First observations:
yarn
. yarn list graphql
gives:ββ @aws-amplify/[email protected]
β ββ [email protected]
ββ [email protected]
npm
. npm list graphql
gives:βββ¬ [email protected]
βββ¬ @aws-amplify/[email protected]
βββ [email protected]
Seems like npm isn't resolving peerdeps of packages that are deep in the tree. So you'll need to use yarn or manually install graphql => npm install graphql@^14.1.1
Hiya!
This issue has gone quiet. Spooky quiet. π»
We get a lot of issues, so we currently close issues after 30 days of inactivity. Itβs been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! πͺπ
I haven't fixed it at all. I quit using the plugin. And just pulled it in
in the components. There is certainly an issue revolving around sharp, node
update, and Gatsby image. I can't get images to work in a static query and
it sucks π©π© please let me know if you hear anything
On Fri, Apr 12, 2019, 12:52 PM Leo Furze-Waddock notifications@github.com
wrote:
@bangarangler https://github.com/bangarangler, After updating deps, I'm
having exactly the same issue, but in a Windows (WSL) environment.Can you explain how you fixed the issue?
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gatsbyjs/gatsby/issues/13278#issuecomment-482646013,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AnL5bUYd_D0EQAwVOW4xItaE5zKIjRY4ks5vgLnlgaJpZM4cov6F
.
Okay geez i spent 6 hours trying to figure this one out fml.
For me installing gatsby-plugin-typescript
was the issue!
It depends on a package that its not even using!!! babel-plugin-remove-graphql-queries
Which then in turn depends on different version of graphql and gives you a really bad day.
As a work around don't use the official plugin but set typescript up your self:
yarn add @babel/preset-typescript --dev
Then the following needs to go into your gatsby-node.js
const resolvableExtensions = () => [`.ts`, `.tsx`]
function onCreateBabelConfig({ actions }) {
actions.setBabelPreset({
name: `@babel/preset-typescript`,
options: {
isTSX: true,
allExtensions: true,
},
})
}
function onCreateWebpackConfig({ actions, loaders }) {
const jsLoader = loaders.js()
if (!jsLoader) {
return
}
actions.setWebpackConfig({
module: {
rules: [
{
test: /\.tsx?$/,
use: jsLoader,
},
],
},
})
}
exports.resolvableExtensions = resolvableExtensions
exports.onCreateBabelConfig = onCreateBabelConfig
exports.onCreateWebpackConfig = onCreateWebpackConfig
Hey again!
Itβs been 30 days since anything happened on this issue, so our friendly neighborhood robot (thatβs me!) is going to close it.
Please keep in mind that Iβm only a robot, so if Iβve closed this issue in error, Iβm HUMAN_EMOTION_SORRY
. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the Gatsby community!
I get the same error after installing react-muuri. I also posted this on the www.reddit.com/r/gatsbyjs, so sorry for the repetition.
Hello All, After a CLI run of : npm install --save react-muuri I got the following response. This is the second time attempting to install muuri. The first time I updated graphQl but that increased the errors. Anyone experienced installing react-muuri ?
Lukes-MacBook-Pro-5% npm install --save react-muuri
[email protected] postinstall /luke_projects_all/Luke-site-calypsoBootstrap/calypso/gatsby-ld/gatsby-site/node_modules/install-peers node install.js
Unable to find peerDependencies in /luke_projects_all/Luke-site-calypsoBootstrap/calypso/gatsby-ld/gatsby-site npm WARN [email protected] requires a peer of [email protected] || 0.12.3 || 0.13.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
Here is my context: gatsby info
System: OS: macOS High Sierra 10.13.6 CPU: (8) x64 Intel(R) Core(TM) i7-3820QM CPU @ 2.70GHz Shell: 5.3 - /bin/zsh Binaries: Node: 8.11.3 - /usr/local/bin/node npm: 6.5.0 - /usr/local/bin/npm Languages: Python: 2.7.10 - /usr/bin/python Browsers: Chrome: 74.0.3729.169 Firefox: 66.0.3 Safari: 11.1.2 npmPackages: gatsby: 2.4.2 => 2.4.2 gatsby-image: 2.0.20 => 2.0.25 gatsby-plugin-manifest: 2.0.9 => 2.0.12 gatsby-plugin-offline: 2.0.16 => 2.0.20 gatsby-plugin-react-helmet: 3.0.2 => 3.0.5 gatsby-plugin-sharp: 2.0.35 => 2.0.35 gatsby-source-filesystem: 2.0.33 => 2.0.33 gatsby-source-google-docs: 1.6.0 => 1.6.0 gatsby-source-google-sheets: 1.1.1 => 1.1.1 gatsby-source-graphql: 2.0.18 => 2.0.18 gatsby-transformer-sharp: 2.1.8 => 2.1.9 npmGlobalPackages: gatsby-cli: 2.6.3
Still having the error.. I follow all the steps above
Using environment config: 'development'
success open and validate gatsby-configs - 0.054 s
success load plugins - 1.840 s
success onPreInit - 0.008 s
success initialize cache - 0.014 s
success copy gatsby files - 0.250 s
success onPreBootstrap - 0.016 s
success source and transform nodes - 30.589 s
error UNHANDLED REJECTION
Error: Cannot create as TypeComposer the following value: Date.
SchemaComposer.js:365 SchemaComposer.createTempTC
[gatsby-netlify-cms-sho]/[graphql-compose]/lib/SchemaComposer.js:365:11
SchemaComposer.js:563 SchemaComposer.addAsComposer
[gatsby-netlify-cms-sho]/[graphql-compose]/lib/SchemaComposer.js:563:27
schema-composer.js:21 createSchemaComposer
[gatsby-netlify-cms-sho]/[gatsby]/dist/schema/schema-composer.js:21:18
index.js:44 Object.
[gatsby-netlify-cms-sho]/[gatsby]/dist/schema/index.js:44:28
Generator.next
new Promise
index.js:67 Object.build
[gatsby-netlify-cms-sho]/[gatsby]/dist/schema/index.js:67:17
index.js:337
[gatsby-netlify-cms-sho]/[gatsby]/dist/bootstrap/index.js:337:32
Generator.next
β building schema
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] develop: npm run clean && gatsby develop
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\UsersPearlPay Laptop 2\AppData\Roamingnpm-cache_logs\2019-06-13T04_06_54_931Z-debug.log
@leonardolouie Could you post the steps you took that lead to this error? It is not 100% clear what "steps above" you're referirng to.
Even better would be a link to a small testing repo with which to reproduce the error. Thank you!
I already fix this error buy removing file .tar in my files then
Yarn add sharp --verbose
Delete node_modules
Yarn
Then it works !
Hiya!
This issue has gone quiet. Spooky quiet. π»
We get a lot of issues, so we currently close issues after 30 days of inactivity. Itβs been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! πͺπ
Hey again!
Itβs been 30 days since anything happened on this issue, so our friendly neighborhood robot (thatβs me!) is going to close it.
Please keep in mind that Iβm only a robot, so if Iβve closed this issue in error, Iβm HUMAN_EMOTION_SORRY
. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the Gatsby community!
For me this happened when using gatsby within lerna. I had different gatsby versions as dependencies for my packages (only two weeks ahead from each other, but looks enough in gatsby π )
Luckily I could just yarn upgrade --latest
in all my packages. Problem solved.
Okay geez i spent 6 hours trying to figure this one out fml.
For me installing
gatsby-plugin-typescript
was the issue!It depends on a package that its not even using!!!
babel-plugin-remove-graphql-queries
Which then in turn depends on different version of graphql and gives you a really bad day.As a work around don't use the official plugin but set typescript up your self:
yarn add @babel/preset-typescript --dev
Then the following needs to go into your gatsby-node.js
const resolvableExtensions = () => [`.ts`, `.tsx`] function onCreateBabelConfig({ actions }) { actions.setBabelPreset({ name: `@babel/preset-typescript`, options: { isTSX: true, allExtensions: true, }, }) } function onCreateWebpackConfig({ actions, loaders }) { const jsLoader = loaders.js() if (!jsLoader) { return } actions.setWebpackConfig({ module: { rules: [ { test: /\.tsx?$/, use: jsLoader, }, ], }, }) } exports.resolvableExtensions = resolvableExtensions exports.onCreateBabelConfig = onCreateBabelConfig exports.onCreateWebpackConfig = onCreateWebpackConfig
removing node_modules and package-lock.json fixed it for me
Same issue, came up today.
Is there any fix for this?
I just ran into that error today and I'm only having 1 version of graphql installed (14.6.0, downgraded from 15.0.0).
Removing node_modules & package-lock.json did not fix it.
I'm thinking of putting `rm -rf node_modules && rm -rf package-lock.json" on a keyboard shortcut though, as often as I reach for this. Just press it every morning while drinking coffee, makes node around 90% more robust.
Is this really because of gatsby-plugin-typscript? If yes, why are not more people having this issue?
__Edit:__
Downgrading graphql to 14.6.0 and downgrading gatsby-plugin-typescript to 2.1.27 seems to have solved the issue for today.
PS:
Putting this into your .bashrc or .zshrc saves you countless hours from typing it out every time:
alias fuck-off-npm="rm -rf node_modules && rm -rf package-lock.json"
FWIW: I had this error and I had just updated graphql to 15.0.0.. Not even sure why graphql was in my dependencies, but once I removed it everything worked again.
i had same error
here is my fix
1- remove node_modules && package-lock.json
2- yarn install
3- yarn start
rm -rf node_modules && rm -rf package-lock.json
a great solution! I did that, but in my case it wasn't enough, I've got something like .cache blah-blah-blah
, so I've came out with this line in my .bashrc
alias fucknpm="rm -rf .cache && rm -rf node_modules && rm package-lock.json && npm install"
I experienced this issue, but it stemmed from using npm to install a new package when everything else was previously installed via yarn π€¦ββοΈ.
To fix, I rimraf'd node_modules, package-lock.json and re-initiated w/ Yarn. Back up and running!
Most helpful comment
i had same error
here is my fix
1- remove node_modules && package-lock.json
2-
yarn install
3-
yarn start