codesandbox / codesandbox/codesandbox-client

Could not find/install babel plugin 'proposal-decorators'

Open
#7,913 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

Description of the problem

Example with an SVG import is resulting in an error:

Error
Could not find/install babel plugin 'proposal-decorators': Cannot find plugin 'proposal-decorators' or 'babel-plugin-proposal-decorators'

This is happening when deploying with react-codesandboxer.

Removing the SVG imports resolves the issue, as does fiddling with dependencies.

After deploying, manually adding @babel/plugin-proposal-decorators as a dependency resolves the issue. Deploying with @babel/plugin-proposal-decorators as a dependency does not, but then removing it seems to.

How has this issue affected you? What are you trying to accomplish?

The example I have deployed is unusable.

To Reproduce

I struggled to create a minimal reproduction, but I will share the sandboxes I am seeing the issue in.

Link to sandbox:
Your Environment
Software Name/Version
Сodesandbox ?
Browser Chrome 115
Operating System MacOS Ventura 13.4.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the two linked sandboxes and the react-codesandboxer deployment path, comparing the cases with and without @babel/plugin-proposal-decorators. Investigate how SVG imports trigger installation of the proposal-decorators plugin. Done means deployments no longer fail with the missing-plugin error without manual dependency changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript, react
Domain
build-system, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.