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.

Next with-firebase-hosting example doesn't seem to work.

See original GitHub issue

Bug report

Describe the bug

I’ve just tried testing the zwith-firebase-hosting[example](https://github.com/zeit/next.js/tree/canary/examples/with-firebase-hosting) and thenpm run devruns ok, but when i trynpm run serve` it fails with this error:

Build error occurred { Error: EEXIST: file already exists, mkdir ‘/Users/user/Sites/with-firebase-hosting/dist/functions/next’ errno: -17, code: ‘EEXIST’, syscall: ‘mkdir’, path: ‘/Users/user/Sites/with-firebase-hosting/dist/functions/next’ } npm ERR! errno 1 npm ERR! with-firebase-hosting@4.0.1 build-app: next build "src/app/" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the with-firebase-hosting@4.0.1 build-app script.

To Reproduce

Follow the steps in the with-firebase-hosting example

Expected behavior

The application to run according to the readme file.

System information

  • OS: MAC Os Catalina
  • Browser (if applies) [e.g. chrome, safari]
  • Version of Next.js: latest
  • Version of NodeJS: v8.15.0 (required by firebase functions)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
ShayDavidsoncommented, Apr 2, 2020

@jenyayel We were on Node 10.11. When I upgraded to 10.12 it started working (as mentioned in this thread https://stackoverflow.com/questions/13696148/node-js-create-folder-or-use-existing/24311711)

3reactions
ShayDavidsoncommented, Mar 31, 2020

got a similar error when i use my docker setup. previously on 9.1.2 it didn’t happen. upgraded to 9.3.2 and the error occurs:

next build

Creating an optimized production build...

> Build error occurred
{ [Error: EEXIST: file already exists, mkdir '/app/.next']
  errno: -17,
  code: 'EEXIST',
  syscall: 'mkdir',
  path: '/app/.next' }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Next with-firebase-hosting example doesn't seem to work.
Describe the bug. I've just tried testing the zwith-firebase-hosting [example](https://github.com/zeit/next.js/tree/canary/examples/with- ...
Read more >
Configure Hosting behavior | Firebase Hosting - Google
Specify which files in your local project directory you want to deploy to Firebase Hosting. · Serve a customized 404/Not Found page. ·...
Read more >
Firebase Functions do not build Next.js project when deployed
In your case, the error seems to be that your .next folder is missing the compiled version of your application. There are two...
Read more >
Next.js on Cloud Functions for Firebase with Firebase Hosting
Welcome to a series exploring Cloud Functions for Firebase with a modern application stack (React, Apollo, GraphQL, Next.js & Firebase).
Read more >
What I struggled with Next.js using Firebase Hosting (and ...
So when the project started, I planned to use Next.js to generate a static website that will work fine, which means Firebase Hosting...
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