Skip to content

bug : Update from supabase studio version v0.23.09 to v0.23.11. #87

Open
@psyrenpark

Description

@psyrenpark

Bug report

I confirm this is a bug with Supabase, not with my own application.
I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
While attempting to update the studioBranch to the latest version, I encountered an error. It appears that the directory structure in Supabase has changed between versions v0.23.09 and v0.23.11, particularly the path from /studio to /apps/studio. This change seems to affect the build process, causing it to fail.

To Reproduce
Steps to reproduce the behavior:

BUG : Update from supabase studio version v0.23.09 to v0.23.11.
Observe the directory change from /studio to /apps/studio.
Attempt to build using the current configuration.
Notice the build process fails due to the directory change.
Expected behavior
The build process should adapt to the updated directory structure without causing any errors, or the documentation should provide clear instructions on how to handle such changes in directory paths.

Screenshots
If applicable, add screenshots to help explain your problem.

/** BuildSpec for Amplify Hosting */
const buildSpec = BuildSpec.fromObjectToYaml({
    version: 1,
    applications: [{
    appRoot,  // TODO: studio => apps/studio ??
    frontend: {
        phases: {
        preBuild: {
            commands: [
            'echo POSTGRES_PASSWORD=$(aws secretsmanager get-secret-value --secret-id $DB_SECRET_ARN --query SecretString | jq -r . | jq -r .password) >> .env.production',
            'echo SUPABASE_ANON_KEY=$(aws ssm get-parameter --region $SUPABASE_REGION --name $ANON_KEY_NAME --query Parameter.Value) >> .env.production',
            'echo SUPABASE_SERVICE_KEY=$(aws ssm get-parameter --region $SUPABASE_REGION --name $SERVICE_KEY_NAME --query Parameter.Value) >> .env.production',
            'env | grep -e STUDIO_PG_META_URL >> .env.production',
            'env | grep -e SUPABASE_ >> .env.production',
            'env | grep -e NEXT_PUBLIC_ >> .env.production',
            'cd ../',
            'npx turbo@1.10.3 prune --scope=studio',
            'npm clean-install',
            ],
        },
        build: {
            commands: [
            'npx turbo run build --scope=studio --include-dependencies --no-deps',
            'npm prune --omit=dev',
            ],
        },
        postBuild: {
            commands: [
            `cd ${appRoot}`,
            `rsync -av --ignore-existing .next/standalone/${repository.repositoryName}/${appRoot}/ .next/standalone/`,
            `rsync -av --ignore-existing .next/standalone/${repository.repositoryName}/node_modules/ .next/standalone/node_modules/`,
            `rm -rf .next/standalone/${repository.repositoryName}`,
            'cp .env .env.production .next/standalone/',
            // https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files
            'rsync -av --ignore-existing public/ .next/standalone/public/',
            'rsync -av --ignore-existing .next/static/ .next/standalone/.next/static/',
            ],
        },
        },
        artifacts: {
        baseDirectory: '.next',
        files: ['**/*'],
        },
        cache: {
        paths: [
            'node_modules/**/*',
        ],
        },
    },
    }],
});

System information

  • amazonlinux 2
  • supabase-on-aws/tree/v0.7.0 -> master

This section indicates the use of 'studio' which may need to be updated to 'apps/studio'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions