Skip to content

stackblitz.openProject throws 403 error if dependencies contains * #24

@nsbarsukov

Description

@nsbarsukov
import stackblitz from '@stackblitz/sdk'; // 1.11.0

stackblitz.openProject({
    template: 'typescript',
    dependencies: {
        '@maskito/core': '*',
        '@maskito/kit': '*',
    },
    title: 'It will throw error!',
    files: {'index.html': 'Hello world!', 'index.ts': ''},
});

it throws

403 ERROR
The request could not be satisfied.

___
Request blocked. We can't connect to the server for this app or website at this time.
There might be too much traffic or a configuration error.
Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, 
you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
___

Generated by cloudfront (CloudFront)
Request ID: WAwVvJAM6OFyLM6Tm88Qtb-IXYqAdoJD6oTU--nw0AZLVr873aB4Qg==

It relates somehow to * inside dependencies-property.
Let's just change code a little bit:

import stackblitz from '@stackblitz/sdk'; // 1.11.0

stackblitz.openProject({
    template: 'typescript',
    dependencies: {
        '@maskito/core': 'latest',
        '@maskito/kit': 'latest',
    },
    title: 'No error',
    files: {'index.html': 'Hello world!', 'index.ts': ''},
});

It is obvious regression because it worked before.
We were using this approach in our Open Source library Maskito from March 2023 (and it worked correctly!).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions