Gatsby-source-prismic gatsby version 3

Hello Everyone.

I tried several times but error with gatsby 3.
gatsby-cli version 3.0.0
gatsby project version 3.0.4
installing gatsby-source-prismic all error

log file details :

0 verbose cli [
0 verbose cli 'C:\Program Files\nodejs\node.exe',
0 verbose cli 'C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
0 verbose cli 'i',
0 verbose cli 'gatsby-source-prismic'
0 verbose cli ]
1 info using npm@7.5.4
2 info using node@v15.5.0
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 11ms
5 timing config:load:builtin Completed in 11ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:D:\mv\s2022\xeserver.npmrc Completed in 1ms
9 timing config:load:project Completed in 2ms
10 timing config:load:file:C:\Users\mohse.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Users\mohse\AppData\Roaming\npm\etc\npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 20ms
19 verbose npm-session 7629b3fb1c9651ee
20 timing npm:load Completed in 50ms
21 timing arborist:ctor Completed in 1ms
22 timing idealTree:init Completed in 1306ms
23 timing idealTree:userRequests Completed in 5ms
24 silly idealTree buildDeps
25 silly fetch manifest gatsby-source-prismic@*
26 timing arborist:ctor Completed in 0ms
27 http fetch GET 304 https://registry.npmjs.org/gatsby-source-prismic 2613ms (from cache)
28 silly fetch manifest gatsby@^3.0.1
29 http fetch GET 304 https://registry.npmjs.org/gatsby 333ms (from cache)
30 silly fetch manifest react@^17.0.1
31 http fetch GET 304 https://registry.npmjs.org/react 263ms (from cache)
32 silly fetch manifest react-dom@^17.0.1
33 http fetch GET 304 https://registry.npmjs.org/react-dom 244ms (from cache)
34 silly placeDep ROOT gatsby-source-prismic@3.3.4 OK for: xeserver@1.0.0 want: *
35 silly fetch manifest es-cookie@^1.3.2
36 silly fetch manifest gatsby-plugin-imgix@^0.8.1
37 silly fetch manifest gatsby-source-filesystem@^2.3.23
38 silly fetch manifest lodash.omit@^4.5.0
39 silly fetch manifest lodash.pick@^4.4.0
40 silly fetch manifest md5@^2.2.1
41 silly fetch manifest prismic-dom@^2.2.3
42 silly fetch manifest prismic-javascript@^2.7.1
43 silly fetch manifest superstruct@^0.10.12
44 silly fetch manifest uuid@^8.2.0
45 http fetch GET 304 https://registry.npmjs.org/es-cookie 591ms (from cache)
46 http fetch GET 304 https://registry.npmjs.org/md5 677ms (from cache)
47 http fetch GET 304 https://registry.npmjs.org/uuid 682ms (from cache)
48 http fetch GET 304 https://registry.npmjs.org/lodash.omit 688ms (from cache)
49 http fetch GET 304 https://registry.npmjs.org/gatsby-source-filesystem 696ms (from cache)
50 http fetch GET 304 https://registry.npmjs.org/prismic-javascript 719ms (from cache)
51 http fetch GET 304 https://registry.npmjs.org/superstruct 886ms (from cache)
52 http fetch GET 304 https://registry.npmjs.org/prismic-dom 901ms (from cache)
53 http fetch GET 304 https://registry.npmjs.org/lodash.pick 905ms (from cache)
54 http fetch GET 304 https://registry.npmjs.org/gatsby-plugin-imgix 930ms (from cache)
55 timing idealTree:#root Completed in 4536ms
56 silly fetch manifest gatsby@>=2.3
57 silly fetch manifest react@>=16.8
58 silly fetch manifest react-dom@^16.9.0 || ^17.0.0
59 silly fetch manifest gatsby@^2.2.0
60 silly fetch manifest react-dom@^16.4.2 || ^17.0.0
61 silly placeDep ROOT es-cookie@1.3.2 OK for: gatsby-source-prismic@3.3.4 want: ^1.3.2
62 silly placeDep ROOT gatsby-plugin-imgix@0.8.2 OK for: gatsby-source-prismic@3.3.4 want: ^0.8.1
63 silly placeDep node_modules/gatsby-source-prismic gatsby-source-filesystem@2.11.1 OK for: gatsby-source-prismic@3.3.4 want: ^2.3.23
64 timing idealTree Completed in 5941ms
65 timing command:install Completed in 5951ms
66 verbose stack Error: unable to resolve dependency tree
66 verbose stack at Arborist.[failPeerConflict] (C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:1136:25)
66 verbose stack at Arborist.[placeDep] (C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:1235:32)
66 verbose stack at Arborist.[placeDep] (C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:1374:41)
66 verbose stack at C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:847:46
66 verbose stack at Array.map ()
66 verbose stack at Arborist.[buildDepStep] (C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:847:8)
66 verbose stack at async Arborist.buildIdealTree (C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:209:7)
66 verbose stack at async Promise.all (index 1)
66 verbose stack at async Arborist.reify (C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\reify.js:127:5)
66 verbose stack at async install (C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\lib\install.js:38:3)
67 verbose cwd D:\mv\s2022\xeserver
68 verbose Windows_NT 10.0.19041
69 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\mohse\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "i" "gatsby-source-prismic"
70 verbose node v15.5.0
71 verbose npm v7.5.4
72 error code ERESOLVE
73 error ERESOLVE unable to resolve dependency tree
74 error
75 error Found: e[1mgatsbye[22m@e[1m3.0.4e[22me[2me[22m
75 error e[2mnode_modules/gatsbye[22m
75 error e[35mpeere[39m e[1mgatsbye[22m@"e[1m^3.0.0-next.0e[22m" from e[1mbabel-plugin-remove-graphql-queriese[22m@e[1m3.0.0e[22me[2me[22m
75 error e[2mnode_modules/babel-plugin-remove-graphql-queriese[22m
75 error e[1mbabel-plugin-remove-graphql-queriese[22m@"e[1m^3.0.0e[22m" from e[1mgatsbye[22m@e[1m3.0.4e[22m
75 error e[1mbabel-plugin-remove-graphql-queriese[22m@"e[1m^3.0.0e[22m" from e[1mgatsby-plugin-imagee[22m@e[1m1.0.1e[22me[2me[22m
75 error e[2mnode_modules/gatsby-plugin-imagee[22m
75 error e[1mgatsby-plugin-imagee[22m@"e[1m^1.0.1e[22m" from the root project
75 error 1 more (gatsby-plugin-typescript)
75 error e[35mpeere[39m e[1mgatsbye[22m@"e[1m^3.0.0-next.0e[22m" from e[1mgatsby-plugin-google-analyticse[22m@e[1m3.0.0e[22me[2me[22m
75 error e[2mnode_modules/gatsby-plugin-google-analyticse[22m
75 error e[1mgatsby-plugin-google-analyticse[22m@"e[1m^3.0.0e[22m" from the root project
75 error 14 more (gatsby-plugin-image, gatsby-plugin-manifest, ...)
75 error
75 error Could not resolve dependency:
75 error e[35mpeere[39m e[1mgatsbye[22m@"e[1m^2.2.0e[22m" from e[1mgatsby-source-filesysteme[22m@e[1m2.11.1e[22me[2me[22m
75 error e[2mnode_modules/gatsby-source-prismic/node_modules/gatsby-source-filesysteme[22m
75 error e[1mgatsby-source-filesysteme[22m@"e[1m^2.3.23e[22m" from e[1mgatsby-source-prismice[22m@e[1m3.3.4e[22me[2me[22m
75 error e[2mnode_modules/gatsby-source-prismice[22m
75 error e[1mgatsby-source-prismice[22m@"e[1m*e[22m" from the root project
75 error
75 error Fix the upstream dependency conflict, or retry
75 error this command with --force, or --legacy-peer-deps
75 error to accept an incorrect (and potentially broken) dependency resolution.
75 error
75 error See C:\Users\mohse\AppData\Local\npm-cache\eresolve-report.txt for a full report.
76 verbose exit 1

Hello @mohsenv, welcome to the Community

Could you tell me which were the steps you took to found this error in your project?

Hey there @mohsenv , thanks for posting!

I tried to recreate the error myself but wasn't able to. I'll break down what I did and you can let me know how your project might differ.

  1. Ran gatsby new with the gatsby cli version 3.0.0
  2. Did not choose any styling options and did not hook it up to Gatsby Cloud or any of the other options given.
  3. After Gatsby install, I ran npm i gatsby-source-prismic which did not throw any errors.

Here's the full package.json I had at the end:

{
  "name": "test-for-v3",
  "version": "1.0.0",
  "private": true,
  "description": "test-for-v3",
  "author": "Alex Trost",
  "keywords": [
    "gatsby"
  ],
  "scripts": {
    "develop": "gatsby develop",
    "start": "gatsby develop",
    "build": "gatsby build",
    "serve": "gatsby serve",
    "clean": "gatsby clean"
  },
  "dependencies": {
    "gatsby": "^3.0.4",
    "gatsby-plugin-manifest": "^3.0.0",
    "gatsby-plugin-sitemap": "^3.0.0",
    "gatsby-source-prismic": "^3.3.4",
    "react": "^17.0.1",
    "react-dom": "^17.0.1"
  }
}

It seems that running npm i gatsby-source-prismic --legacy-peer-deps might be a solution for you, as this breaking change is more likely to be because of React v17 than Gatsby v3. Here's a Stack Overflow post on the topic: https://stackoverflow.com/a/66620869/1556526

If this doesn't work please post your package.json and any additional steps that might help me recreate it. Or if you can push your Gatsby code to a github repo I could take a look that way. Thanks!

This issue has been closed due to inactivity. Flag to reopen.