-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm ERR! code ELIFECYCLE, npm ERR! errno 1 ... #66
Comments
These logs don't seem to point to a specific problem or line with the error. Could you make this reproducible in a GitHub project please? |
@Haroenv yep that's my quandary too! I'm making a repo now to try to replicate and share. I was wondering whether there were any fundamental problems with my code. I'll post the repo asap |
I've now got this working. The suggestion to make a repo was a very good one! It worked out of the box. So i've tried to step back though the settings I had originally to find the problem. By adding an In the example up top I am only getting a single field, This makes some sense, but perhaps a more useful error can be produced if this happens? Also if there's some advanced way of debugging this that would be helpful. I've created a repo here that works perfectly with Sanity and Algolia, you can reproduce the error using this and following the instructions below: By removing |
Interesting, I expect there to be a clear error in that case "id or objectID required", do you see that now or was it swallowed by something? |
I think its getting swallowed, or not there, here's the output from the basic sanity site i made:
here's the second log referenced in the terminal output above, the two logs are identical (except one references the web directory - sanity uses a monorepo with a sanity directory and a web directory for Gatsby):
|
Here's a working version from a basic repo: The issue was leaving out the |
I'm going to reopen this so I can investigate why the error wasn't shown later. Glad you found your solution though! |
I had a very similar issue that took me a few days to finally resolve. Mine was a tad more complex in that I was breaking my GraphQL results down into small chunks. Algolia was deduplicating those chunks because I was passing the same ID (many Algolia records for my one record). I had to append the
I agree that it could be called out more clearly that each record requires a unique ID that we are responsible for sending. Hopefully this post saves someone else the trouble. |
I came across the same issue again yesterday, on a different project, found my own issue and remembered the fix! |
I agree a better error should be shown here. Either the error from Algolia could be shown again, or we can do an isUnique on the objectIds before sending. Open for contributions here! |
I've had algolia running fine with a different API, now I'm trying to get it to work with Sanity.io and have what i think is a very simple query to get going with. This query works fine in graphiQL:
Here's the code, and to debug i put all the API credentials in the code and took it out of .env.production incase there was an issue there. I'm building locally:
In my config settings:
From the log mentioned above:
I want to try and debug this, but can't understand how - if anyone can help me there too that would be great.
The text was updated successfully, but these errors were encountered: