Pyrax / gatsby-theme-contact

Contact page for Gatsby which comes with Netlify Forms by default.
MIT License
6 stars 1 forks source link

Error when building with Yarn v3 #2

Open insuusvenerati opened 3 years ago

insuusvenerati commented 3 years ago

Running into an error when using yarn 3.1.0 on a new gatsby project.

verbose set gatsby_log_level: "verbose"

verbose set gatsby_executing_command: "build"

verbose loading local command from: /home/stiforr/Code/treats-portfolio/.yarn/un
plugged/gatsby-virtual-9a87310452/node_modules/gatsby/dist/commands/build.js

verbose running command: build

warn Plugin gatsby-plugin-robots-txt is not compatible with your gatsby version
4.0.1 - It requires gatsby@^3.0.0 || ^2.0.0

warn Plugin gatsby-plugin-theme-ui is not compatible with your gatsby version
4.0.1 - It requires gatsby@^2.0.0 || ^3.0.0

warn Plugin gatsby-theme-contact is not compatible with your gatsby version
4.0.1 - It requires gatsby@^3.6.1

warn Plugin gatsby-source-datocms is not compatible with your gatsby version
4.0.1 - It requires gatsby@^2.12.1 || ^3.0.0

warn Plugin @sentry/gatsby is not compatible with your gatsby version 4.0.1 - It
 requires gatsby@^2.0.0 || ^3.0.0

warn Plugin gatsby-plugin-robots-txt is not compatible with your gatsby version
4.0.1 - It requires gatsby@^3.0.0 || ^2.0.0

warn Plugin gatsby-plugin-theme-ui is not compatible with your gatsby version
4.0.1 - It requires gatsby@^2.0.0 || ^3.0.0

warn Plugin gatsby-theme-contact is not compatible with your gatsby version
4.0.1 - It requires gatsby@^3.6.1

warn Plugin gatsby-source-datocms is not compatible with your gatsby version
4.0.1 - It requires gatsby@^2.12.1 || ^3.0.0

warn Plugin @sentry/gatsby is not compatible with your gatsby version 4.0.1 - It
 requires gatsby@^2.0.0 || ^3.0.0

success open and validate gatsby-configs, load plugins - 1.374s

success onPreInit - 0.004s

success initialize cache - 0.102s

success copy gatsby files - 0.075s

verbose Attaching functions to development server

success Compiling Gatsby Functions - 0.327s

success onPreBootstrap - 0.342s

verbose Creating 5 worker

success loading DatoCMS schema - 0.669s

success createSchemaCustomization - 0.693s

success loading DatoCMS content - 3.118s

verbose Checking for deleted pages

verbose Deleted 0 pages

verbose Found 0 changed pages

success Checking for changed pages - 0.003s

success source and transform nodes - 3.212s

info Writing GraphQL type definitions to
/home/stiforr/Code/treats-portfolio/.cache/schema.gql

success building schema - 1.038s

 ERROR #11321  PLUGIN

"gatsby-theme-contact" threw an error while running the createPages lifecycle:

[true-case-path]: Called with .yarn/__virtual__/gatsby-theme-contact-virtual-93c4a2943
2/0/cache/gatsby-theme-contact-npm-3.0.0-45540c87bb-10bbeaff48.zip/node_modules/gatsby
-theme-contact/src/templates/contact.js, but no matching file exists

  14 |
  15 |   pages.forEach((page) => {
> 16 |     actions.createPage(page)
     |             ^
  17 |   })
  18 | }
  19 |

File:.yarn/__virtual__/gatsby-theme-contact-virtual-93c4a29432/0/cache/gatsby-theme-co
     ntact-npm-3.0.0-45540c87bb-10bbeaff48.zip/node_modules/gatsby-theme-contact/gatsb
     y-node.js:16:13

  Error: [true-case-path]: Called with .yarn/__virtual__/gatsby-theme-contact-vi
  rtual-93c4a29432/0/cache/gatsby-theme-contact-npm-3.0.0-45540c87bb-10bbeaff48.
  zip/node_modules/gatsby-theme-contact/src/templates/contact.js, but no matchin
  g file exists

  - index.js:33 matchCaseInsensitive
    [true-case-path-npm-2.2.1-0454edfb3a-fd5f1c2a87.zip]/[true-case-path]/index.
    js:33:9

  - index.js:73
    [true-case-path-npm-2.2.1-0454edfb3a-fd5f1c2a87.zip]/[true-case-path]/index.
    js:73:7

  - Array.reduce

  - index.js:69 iterateSync
    [true-case-path-npm-2.2.1-0454edfb3a-fd5f1c2a87.zip]/[true-case-path]/index.
    js:69:19

  - index.js:63 trueCasePathSync
    [true-case-path-npm-2.2.1-0454edfb3a-fd5f1c2a87.zip]/[true-case-path]/index.
    js:63:9

  - public.js:324 actions.createPage
    [gatsby-virtual-9a87310452]/[gatsby]/src/redux/actions/public.js:324:35

  - redux.js:483 boundActionCreator
    [redux-npm-4.0.5-aca53e621f-23689ba431.zip]/[redux]/lib/redux.js:483:35

  - api-runner-node.js:63 createPageAction
    [gatsby-virtual-9a87310452]/[gatsby]/src/utils/api-runner-node.js:63:20

  - api-runner-node.js:329 Object.createPage
    [gatsby-virtual-9a87310452]/[gatsby]/src/utils/api-runner-node.js:329:11

  - gatsby-node.js:16
    [gatsby-theme-contact-npm-3.0.0-45540c87bb-10bbeaff48.zip]/[gatsby-theme-con
    tact]/gatsby-node.js:16:13

  - Array.forEach

  - gatsby-node.js:15 Object.exports.createPages
    [gatsby-theme-contact-npm-3.0.0-45540c87bb-10bbeaff48.zip]/[gatsby-theme-con
    tact]/gatsby-node.js:15:9

  - api-runner-node.js:430 runAPI
    [gatsby-virtual-9a87310452]/[gatsby]/src/utils/api-runner-node.js:430:22

  - api-runner-node.js:581 Promise.catch.decorateEvent.pluginName
    [gatsby-virtual-9a87310452]/[gatsby]/src/utils/api-runner-node.js:581:13

  - debuggability.js:384 Promise._execute
    [bluebird-npm-3.7.2-6a54136ee3-869417503c.zip]/[bluebird]/js/release/debugga
    bility.js:384:9

  - promise.js:518 Promise._resolveFromExecutor
    [bluebird-npm-3.7.2-6a54136ee3-869417503c.zip]/[bluebird]/js/release/promise
    .js:518:18

failed createPages - 0.096s
insuusvenerati commented 3 years ago

Just a note that this only occurs with https://yarnpkg.com/features/zero-installs. Setting nodeLinker: node-modules doesn't cause the issue.

insuusvenerati commented 3 years ago

Work around is to just shadow the templates folder.

Pyrax commented 3 years ago

Thanks for reporting this! I will have a look into how we can enable zero installs.