Sanity Project - Kitchen Sink - Netlify build-web hangs after graphql-deploy - netlify

Create Kitchen Sink | Sanity
Hey guys, I was trying to deploy this Sanity project to Netlify but it stopped when it got to the Graphql part. Appreciate any help! Thanks!
Build log:
6:15:14 PM: > sanity-kitchen-sink-studio#1.0.7 graphql-deploy
6:15:14 PM: > sanity graphql deploy --playground
6:15:15 PM: Dataset: production
6:15:15 PM: Tag: default
6:15:15 PM: - Checking for deployed API
6:15:15 PM: ✔ Checking for deployed API
6:15:15 PM: - Generating GraphQL schema
6:15:17 PM: This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills
This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills
part:#sanity/components/buttons/button-collection is deprecated. Use part:#sanity/components/buttons/button-grid
6:15:18 PM: ✔ Generating GraphQL schema
6:15:18 PM: - Validating GraphQL API
6:15:18 PM: ✔ Validating GraphQL API
6:15:18 PM: - Deploying GraphQL API
6:15:20 PM: ✔ Deploying GraphQL API
6:15:20 PM: GraphQL API deployed to:
6:15:20 PM: https://dd4yqumq.api.sanity.io/v1/graphql/production/default

Related

Why do i get a optional chaining syntax error when my code is deployed but not locally if they are using the same node version?

Recently I upgraded various packages (nextJS and Apollo) and so had to upgrade my version of node to 16.13.1 as required. I am using a github build workflow and specify the node version to be 16.13.1. When it is finished building it deploys but I get 500 errors when an api call tries to hit apollo. I suspect my apollo server is not building. When I look at the console logs I can see an error wrt to optional chaining which i suspect is stopping the apollo server from building properly hence causing the 500 runtime errors when it tries to be queried. Optional chaining should be working on this version of node and it does when running locally so why not when deployed?
Any debugging recommendations? I think pursuing the problem code below is a red herring fyi
Error copied from console:
2023-01-17T11:45:58.249754172Z /home/site/wwwroot/.next/server/pages/api/graphql.js:5515
2023-01-17T11:45:58.249791573Z if (!response?.record) return null;
2023-01-17T11:45:58.249796773Z ^
2023-01-17T11:45:58.249800473Z
2023-01-17T11:45:58.249803973Z SyntaxError: Unexpected token '.'
2023-01-17T11:45:58.249807573Z at wrapSafe (internal/modules/cjs/loader.js:915:16)
2023-01-17T11:45:58.249811173Z at Module._compile (internal/modules/cjs/loader.js:963:27)
2023-01-17T11:45:58.249814773Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
Workflow file (only showing node and build steps)
on:
push:
branches:
- test
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout#master
- uses: actions/cache#v1
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
- name: Set up Node.js version
uses: actions/setup-node#main
with:
node-version: '16.13.1'
- name: npm install, build, and test
run: |
npm install
npm run build
npm run lint:eslint
npm run test:ci
tried altering the version of node and syntax. Used node-version '16', '14', '12.x', '16.x'.
tried to use different actions/setup-node versions inc 'v1', 'v2' 'v3'.
tried to build without the caching step (actions/cache#v1 with .....etc) - this actually results in an Internal Server Error failure when deployed and my wider nextjs app pages seem to fail as well. console logs seems to suggest issues with 'nullish coalescing operator' is the cause in this case.
I found out that the container I am hosting my app within has a Target Framework configuration setting that is set to node 12. When I updated this to node 16 the build worked.
See post here for changing configuration in Azure App Service: Changing the target framework in an Azure web app
In summary the app was built successfully in node 16 and deployed to the app service as a node 16 app but whatever the container was doing it was doing it in node 12 and so complained about syntax that was not available in node 12 eg optional chaining and nullish coalescing.
I am not sure if this setup is only specific to Azure so hopefully this can help someone as at least a check to perform if you face a similar issue.

Failed to load function definition from source: Failed to generate manifest from function source: Error: Cannot find module 'firebase-admin/auth'

I'm getting the following error while trying to deploy any function to firebase functions:
Command:
firebase deploy --only functions
And this is the output
i deploying functions
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
i artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
✔ artifactregistry: required API artifactregistry.googleapis.com is enabled
✔ functions: required API cloudbuild.googleapis.com is enabled
✔ functions: required API cloudfunctions.googleapis.com is enabled
i functions: preparing codebase default for deployment
Error: Failed to load function definition from source: Failed to generate manifest from function source: Error: Cannot find module 'firebase-admin/auth'
I've already tried removing node_modules folder with rm -rf node_modules and npm install with no success.
Firebase tools version: 11.18.0
Node version: v18.12.1
NPM version: 8.19.2
It was properly working only few days ago and suddenly stopped. Does anyone know how to fix this?

problemes hosting a nodejs app on anw Elastic Beanstalk with code pipeline from github

I'm trying to import code from github via pipeline to Elastic Beanstalk and I get those errors on eb-engine.log
2022/06/03 21:48:30.995763 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment: You didn't specify a Node.js version in the 'package.json' file in your source bundle. The deployment didn't install a specific Node.js version.","timestamp":1654292898290,"severity":"INFO"},{"msg":"Instance deployment: 'npm' failed to install dependencies that you defined in 'package.json'. For details, see 'eb-engine.log'. The deployment failed.","timestamp":1654292910995,"severity":"ERROR"},{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1654292910995,"severity":"ERROR"}]}]}
2022/06/03 21:48:30.996582 [INFO] Platform Engine finished execution on command: app-deploy

git ref refs/heads/dashboard-angular does not exist or you do not have permission

I am getting the below error while I am trying to deploy my Angular application to Netlify from bitbucket.
These are the neatlify logs.
11:38:49 PM: Build ready to start
11:38:51 PM: build-image version: 7c49b266ed8abd833dee6036ec0a4b9ee887658a
11:38:51 PM: buildbot version: f58df58ab0bceffdcb8d1e60fec992495a2a6751
11:38:51 PM: Fetching cached dependencies
11:38:51 PM: Starting to download cache of 254.8KB
11:38:51 PM: Finished downloading cache in 129.507361ms
11:38:51 PM: Starting to extract cache
11:38:51 PM: Failed to fetch cache, continuing with build
11:38:51 PM: Starting to prepare the repo for build
11:38:52 PM: git ref refs/heads/dashboard-angular does not exist or you do not have permission
11:38:52 PM: Failing build: Failed to prepare repo
11:38:52 PM: failed during stage 'preparing repo': git ref refs/heads/dashboard-angular does not exist
11:38:52 PM: Finished processing build request in 833.373404ms
This usually happens because there are no permissions for Netlify to pull your source code. Netlify accesses repositories SOLELY via Deploy Key.
Netlify cannot automatically install a deploy key on any git service (GitHub, GitLab or BitBucket) unless the installing/logged in user has administrative access privileges.
After acquiring appropriate permissions and re-linking via Netlify's UI, the deploy key was successfully install and pulls in Netlify's CI worked better.
Netlify's helpdesk can advise on workflows for cases where administrative access is not available.

Add NodeJS to a Clojure app in Heroku

I need the node program (NodeJS) to be present in my dynos in Heroku when I deploy a Clojure app. My app is not a NodeJS app, it cannot have a package.json for example and I don't want Heroku to validate whether it's a valid NodeJS app or not (it's not, it's a Clojure app).
What's the way to achieve this?
I tried setting up explicit buildpacks:
$ heroku buildpacks
=== projectx Buildpack URLs
1. https://github.com/heroku/heroku-buildpack-nodejs
2. https://github.com/heroku/heroku-buildpack-clojure
but still when deploying I get this error message:
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Multipack app detected
remote: -----> Fetching custom git buildpack... done
remote:
remote: ! Push rejected, failed to detect
On the logs I can see this:
2015-09-21T10:56:07.731335+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-21T10:56:07.731344+00:00 heroku[slug-compiler]: Slug compilation failed: no Cedar-supported app detected
2015-09-21T10:56:07.731346+00:00 heroku[slug-compiler]: HINT: This occurs when Heroku cannot detect the buildpack
2015-09-21T10:56:07.731347+00:00 heroku[slug-compiler]: to use for this application automatically.
2015-09-21T10:56:07.731348+00:00 heroku[slug-compiler]: See https://devcenter.heroku.com/articles/buildpacks
2015-09-21T10:58:07.541720+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-21T10:58:07.541729+00:00 heroku[slug-compiler]: Slug compilation failed: failed to detect
2015-09-21T11:00:28.651321+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-21T11:00:28.651329+00:00 heroku[slug-compiler]: Slug compilation failed: failed to detect
Try adding a package.json file to your project with these contents:
{}
The Node.js buildpack must detect this minimal config in order to run.
Make sure package.json file is committed to Git as well.
You can use a custom build file to override the default build behavior of Clojure buildpack so it also installs NodeJS. Feel free to use bin/build from my cljsnode project.

Resources