question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This example with erro in deploy

yarn build ✔ yarn serve ✔

i deploying functions, hosting i functions: ensuring necessary APIs are enabled… ✔ functions: all necessary APIs are enabled i functions: preparing . directory for uploading…

Error: Error occurred while parsing your function triggers.

Error: > Couldn’t find a pages directory. Please create one under the project root at findPagesDir (/Users/robsonkades/Documents/myprojects/firebase-gcp-examples/functions-nextjs/node_modules/next/dist/lib/find-pages-dir.js:3:170) at new DevServer (/Users/robsonkades/Documents/myprojects/firebase-gcp-examples/functions-nextjs/node_modules/next/dist/server/next-dev-server.js:1:2962) at createServer (/Users/robsonkades/Documents/myprojects/firebase-gcp-examples/functions-nextjs/node_modules/next/dist/server/next.js:2:105) at Object.<anonymous> (/Users/robsonkades/Documents/myprojects/firebase-gcp-examples/functions-nextjs/dist/server/index.js:22:31) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:30 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
jthegeduscommented, May 3, 2020

Hi all, please see my new example which addressed many of the issues people had with the setup. I believe the structure will cause less confusion.

https://github.com/jthegedus/firebase-gcp-examples/tree/master/functions-nextjs

I intend to update this example using the new emulator within the next 48 hours

Lol, sorry about that.

I have the new emulator in this example, though the Next.js development server doesn’t run well on the local Cloud Function. I don’t think you will need to run the local emulator though as the next dev server does most of what you need. The Cloud Function server is just a bridge between the two envs, not a fully working development setup.

Given the drastically new example I will close this. If you find issues with the new setup please do raise new issues! Thanks

3reactions
rscottencommented, Nov 25, 2019

@robsonkades I changed

"deploy": "yarn firebase deploy --only functions,hosting"

to

"deploy": "NODE_ENV=production yarn firebase deploy --only functions,hosting"

and it worked

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web Deploy error codes - Microsoft Learn
Errors occur when you use Web Deploy - Internet Information Services. This article provides resolutions for the unexpected error that occurs ...
Read more >
Common Deployment Errors - DeployHQ
Common Deployment Errors · 452 Transfer aborted. No space left on device · 552 Disk full - please upload later · Automatic Deployments...
Read more >
Package deployment errors - IBM
Deployment errors occur primarily when the configuration data in the package cannot be validated. If you cannot correct the errors that are displayed...
Read more >
Chapter 12. Viewing deployment errors
Failed to deploy storage. If an error occurs during storage deployment, the deployment process halts and Deployment failed is displayed.
Read more >
Error on deploy service - OutSystems
Hi,. I'm getting the following error on the deploy service of one of our front end's. Exception during deployment. The system cannot find...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found