Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

nextjs standalone folder not found

Samuel Odebunmi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 5, 2024

I was able to build the image successfully on my local machine and the standalone folder was there when i inspected the build but on the bitbucket pipeline, it keeps saying the folder is not found. Besides, this passes sometimes after several trials but of recent, it is not even working again.

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 6, 2024

Hello @Samuel Odebunmi , and welcome to the Community!

I'm not sure if I fully understand your issue, so I would like to ask for a few more details about your setup : 

  • Are you facing the issue when running a build using Bitbucket Pipelines? If yes, are you using self-hosted runners, or is the build executed on the cloud (Atlassian infrastructure)?
  • If using self-hosted runners, which type of runners? Linux docker, Linux shell, macOS, or Windows?
  • Could you share with us here the YAML file of your build and also the logs of the failed build so we can take a look at your build setup and also the exact error that is being displayed? Please make sure to sanitize any sensitive information from the logs as this is a public forum.

With this information we'll be better equipped to assist you further on this investigation. Thank you, @Samuel Odebunmi !

Patrik S

Eugen Kochtyrew
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 6, 2024

Same for me, but not only the standalone folder in .next other folders like static, etc. are also missing.
It also takes like 8 Minutes for a fresh nextjs app created with "npx create-next-app@latest"

 

I increased the memory to 2x, but it also does not seem to solve the issue.

 

pipelines:
branches:
develop:
- step:
size: 2x
services:
- docker

 

Pedro Paulo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 10, 2024

Same here. Any news on that?

Or the pipeline hangs in the build (for more than 1 hour sometimes!) until I manually cancel it. OR the pipeline error out, but the NextJs folders like the .next/standalone and static can not be found. They simply are not there, and no errors is shown in the log window.

I could "cat next.config.mjs" file and the output I see in the console is correctly set to "standalone". What the heck could happen, BitBucket?

I'll test this image in GitHub Actions. I'm pretty sure it will work flawlessly, as it works on my local machine.

Eugen Kochtyrew
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 11, 2024

This fixed it for me:

 

options:
docker: true
size: 2x
max-time: 10

definitions:
services:
docker:
memory: 4096
Arilson Barcelos
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 5, 2024

Thank you, @Eugen Kochtyrew

This worked for me too!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events