Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@babel/cli Compilation error in ci after 7.7.0 #10922

Closed
LabhanshAgrawal opened this issue Dec 24, 2019 · 3 comments · Fixed by #10923
Closed

@babel/cli Compilation error in ci after 7.7.0 #10922

LabhanshAgrawal opened this issue Dec 24, 2019 · 3 comments · Fixed by #10923
Assignees
Labels
Has PR i: bug i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: cli

Comments

@LabhanshAgrawal
Copy link

Bug Report

Current Behavior
Compilation in CI failing for versions of cli after 7.7.0 with the following error

babel: stdin compilation requires either -f/--filename [filename] or --no-babelrc

Input Code
Trying to update cli version in hyper repository
Gives an error while running this command

cross-env BABEL_ENV=production babel --out-file target/renderer/bundle.js --no-comments --minified target/renderer/bundle.js

see the end of failed CI output in this pr

Expected behavior/code
Continue to work without errors like till 7.7.0

Babel Configuration (package.json#babel)

 "babel": {
    "presets": [
      "@babel/react",
      "@babel/typescript"
    ],
    "plugins": [
      [
        "styled-jsx/babel",
        {
          "vendorPrefixes": false
        }
      ],
      "@babel/plugin-proposal-numeric-separator",
      "@babel/proposal-class-properties",
      "@babel/proposal-object-rest-spread",
      "@babel/plugin-proposal-optional-chaining"
    ],
    "env": {
      "production": {
        "plugins": [
          "minify-constant-folding",
          "minify-dead-code-elimination",
          "minify-flip-comparisons",
          "minify-guarded-expressions",
          "minify-infinity",
          [
            "minify-mangle-names",
            {
              "keepClassName": true,
              "keepFnName": true
            }
          ],
          "minify-replace",
          "minify-simplify",
          "minify-type-constructors",
          "transform-member-expression-literals",
          "transform-merge-sibling-variables",
          "transform-minify-booleans",
          "transform-property-literals",
          "transform-simplify-comparison-operators",
          "transform-undefined-to-void"
        ]
      }
    }
  }

Environment

npmPackages:
    @babel/cli: 7.7.0 => 7.7.0 
    @babel/core: 7.7.7 => 7.7.5 
    @babel/plugin-proposal-class-properties: ^7.7.4 => 7.7.4 
    @babel/plugin-proposal-numeric-separator: ^7.7.4 => 7.7.4 
    @babel/plugin-proposal-object-rest-spread: ^7.7.4 => 7.7.4 
    @babel/plugin-proposal-optional-chaining: 7.7.5 => 7.7.5 
    @babel/preset-react: 7.7.4 => 7.7.4 
    @babel/preset-typescript: 7.7.7 => 7.7.4 
    babel-loader: 8.0.6 => 8.0.6 
    babel-preset-minify: 0.5.1 => 0.5.1 
    eslint: 6.7.2 => 6.7.2 
    webpack: 4.41.3 => 4.41.3 
  • Babel version(s): v7.7.7
  • Node/npm version: node 12.13.1 (x64)
  • OS: Windows 10
  • Monorepo: no
  • How you are using Babel: cli, loader
@babel-bot
Copy link
Collaborator

Hey @LabhanshAgrawal! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@nicolo-ribaudo
Copy link
Member

This might have been caused by #10698

@JLHwung JLHwung self-assigned this Dec 24, 2019
@JLHwung
Copy link
Contributor

JLHwung commented Dec 24, 2019

As a workaround, you can put the filename before the options:

cross-env BABEL_ENV=production babel target/renderer/bundle.js --out-file target/renderer/bundle.js --no-comments --minified

@JLHwung JLHwung added the Has PR label Dec 24, 2019
LabhanshAgrawal referenced this issue in vercel/hyper Dec 25, 2019
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Mar 26, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Has PR i: bug i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants