Closed radovalach closed 4 years ago
I'm experiencing the same problem, even reverting to an older version (3.3.1) of this plugin didn't solve this error.
Same here, started yesterday .... tried various versions of node, done the usual removal of node_modules, yarn/npm locks and just about everything else.
Same. Trying to troubleshoot issues using imageSharp and changed versions, albeit to a lower one, and this began.
Yep same, started for me yesterday at 2pm(gmt), I've tried re-installing absolutely everything. Though the only update to this plugin was 8 days ago, so this could be an issue with Prismic?
Hi @radovalach Thanks for letting us know about this issue.
If it's urgent then I would recommend using this version of the gatsby-source-prismic-graphql plugin until the gatsby-source-graphql-universal
plugin is fixed and updated.
npm install --save prismicio/gatsby-source-prismic-graphql#flat
then run npm run clean && npm start
That should be the problem solved :)
@MarcMcIntosh using #flat works for now, thank you!
Hi @MarcMcIntosh ,
I tried your solution, but I get the following error, when executing npm install --save prismicio/gatsby-source-prismic-graphql#flat
:
npm install --save prismicio/gatsby-source-prismic-graphql#flat
npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep > core-js@2.6.11 postinstall /home/dusan/.npm/_cacache/tmp/git-clone-a3b31331/node_modules/core-js
npm ERR! prepareGitDep > node -e "try{require('./postinstall')}catch(e){}"
npm ERR! prepareGitDep
npm ERR! prepareGitDep Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
npm ERR! prepareGitDep
npm ERR! prepareGitDep The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
npm ERR! prepareGitDep > https://opencollective.com/core-js
npm ERR! prepareGitDep > https://www.patreon.com/zloirock
npm ERR! prepareGitDep
npm ERR! prepareGitDep Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > core-js-pure@3.6.5 postinstall /home/dusan/.npm/_cacache/tmp/git-clone-a3b31331/node_modules/core-js-pure
npm ERR! prepareGitDep > node -e "try{require('./postinstall')}catch(e){}"
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > gatsby-telemetry@1.2.3 postinstall /home/dusan/.npm/_cacache/tmp/git-clone-a3b31331/node_modules/gatsby-telemetry
npm ERR! prepareGitDep > node src/postinstall.js || true
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > gatsby-cli@2.11.8 postinstall /home/dusan/.npm/_cacache/tmp/git-clone-a3b31331/node_modules/gatsby/node_modules/gatsby-cli
npm ERR! prepareGitDep > node scripts/postinstall.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > gatsby@2.20.22 postinstall /home/dusan/.npm/_cacache/tmp/git-clone-a3b31331/node_modules/gatsby
npm ERR! prepareGitDep > node scripts/postinstall.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > gatsby-source-prismic-graphql@3.5.0 prepare /home/dusan/.npm/_cacache/tmp/git-clone-a3b31331
npm ERR! prepareGitDep > npm run clean && cross-env NODE_ENV=production npm run build
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > gatsby-source-prismic-graphql@3.5.0 clean /home/dusan/.npm/_cacache/tmp/git-clone-a3b31331
npm ERR! prepareGitDep > rimraf {interfaces,types,components,utils,*.js}
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > gatsby-source-prismic-graphql@3.5.0 build /home/dusan/.npm/_cacache/tmp/git-clone-a3b31331
npm ERR! prepareGitDep > tsc --emitDeclarationOnly && babel src --out-dir ./ --extensions '.js,.ts,.tsx'
npm ERR! prepareGitDep
npm ERR! prepareGitDep src/components/WrapPage.tsx(1,23): error TS2307: Cannot find module 'lodash/clonedeep'.
npm ERR! prepareGitDep
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 2
npm ERR! prepareGitDep npm ERR! gatsby-source-prismic-graphql@3.5.0 build: `tsc --emitDeclarationOnly && babel src --out-dir ./ --extensions '.js,.ts,.tsx'`
npm ERR! prepareGitDep npm ERR! Exit status 2
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the gatsby-source-prismic-graphql@3.5.0 build script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR! /home/dusan/.npm/_logs/2020-05-06T21_29_52_009Z-debug.log
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 2
npm ERR! prepareGitDep npm ERR! gatsby-source-prismic-graphql@3.5.0 prepare: `npm run clean && cross-env NODE_ENV=production npm run build`
npm ERR! prepareGitDep npm ERR! Exit status 2
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the gatsby-source-prismic-graphql@3.5.0 prepare script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR! /home/dusan/.npm/_logs/2020-05-06T21_29_52_057Z-debug.log
npm ERR! prepareGitDep
npm ERR! premature close
Do you know what might be the issue?
I tried with node
versions v12.16.1
and v10.19.0
My npm
version is: 6.14.5
@noblica Have you trried deleting your node_module directory?
Hi @MarcMcIntosh same for me,
I had the issue then followed your recomandations.
After updating npm install --save prismicio/gatsby-source-prismic-graphql#flat
I can build locally,
but when trying deploy to Netlify build failed with the same error as @noblica.
@MarcMcIntosh yep, it still fails.
Looking at the log, it seems to fail in the build
step, because of some missing dependencies:
npm ERR! prepareGitDep src/components/WrapPage.tsx(1,23): error TS2307: Cannot find module 'lodash/clonedeep'.
I also cloned the repo locally, it throws the same issue when running npm install
.
It seems that the issue was a typo with the lodash import (clonedeep
vs cloneDeep
). I created a PR here, can you please take a look?
Hi there, a fix is on its way: https://github.com/birkir/gatsby-source-graphql-universal/pull/16
@noblica the fix has been merged :) thanks :)
@MarcMcIntosh @veloce @birkir
I'm still getting this issue after trying both:
So I don't think this issue should be closed yet?
Using the version off of the prismicio fork's "flat" branch, I'm running into the same lodash/clonedeep issue called out by @noblica (building within AWS Codepipeline).
I'm confused about two things: 1) the PR @nobilica added seems to have been merged, so I'm not sure why I'm still seeing the bug in question? 2) What is the long term approach to this issue since it doesn't appear to be fixed on birkir's root repo?
Additionally, when I bump to either of the versions listed in my comment above (from 3.4-beta.2, which I've been using for a while), I get "module not found" errors when I run gatsby develop
:
Any help would be really appreciated.
- When I use "birkir/gatsby-source-prismic-graphql" (3.4-beta.2 OR 3.6.2) the missing module is "babel-plugin-remove-graphql-queries"
Maybe it's a typo, but I see the latest version for this package, in it's package.json
, is 3.3.0
.
And for the #flat one it's 3.5.0
. I don't see 3.6.2
anywhere. Could that be the issue?
@noblica Thanks for the input!
Since you're referencing the #flat branch, I think what you're looking at is probably the prismicio fork of the original gatsby-source-prismic-graphql by birkir.
Which is part of my question- whether the community is supposed to be using that fork going forward and if so, why hasn't npm been updated to point at it? (Currently if you just npm install or yarn add gatsby-source-prismic-graphql without specifying a repo, branch, and/or version number you get 3.6.2 from birkir)
@codebravotech
Hey, my bad, you are correct, I have the 3.6.2
version installed, as you mentioned.
But it seems to be working for me. I'm guessing you already tried deleting both the node_modules
and package.lock
files, and re-installing?
I deleted my previous comments to not send others down the wrong road- the issue for me was in another use of murmurhash elsewhere in my dependencies that needs to be fixed in the same way veloce did in birkir/gatsby-source-graphql-universal#16
Hi! I'm trying to create new project using
gatsby-source-prismic-graphql
but I can't even build the project with basic configuration. It was working fine on my older project though.Steps to reproduce:
gatsby new test
cd test
yarn add gatsby-source-prismic-graphql prismic-reactjs
gatsby-config.js
with:gatsby develop
Result:
Versions:
package.json
Do you know what causes problem with
murmurhash
and how to fix it? Thanks!