Skip to content

yarn deploy fails to build a mirror-saga dependencies #4170

Closed
@francisrod01

Description

@francisrod01

Environment

  1. node -v: 9,3,0
  2. npm -v: 5.5.1
  3. yarn --version (if you use Yarn): 1.5.1
  4. yarn list react-scripts (if you haven’t ejected): 1.1.1

Then, specify:

  1. Operating system: Linux Version 3.16.0-5-amd64, Compiled Add missing semver dependency #1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08)
  2. Browser and version (if relevant): Google Chrome Version 65.0.3325.162 (Official Build) (64-bit)

Steps to Reproduce

I'm using a mirror-saga to build a redux-saga and firebase hosting to my React project.
More details here: https://github.com/ShMcK/mirror-saga

  1. I'm trying to build a project using yarn and react-app-env
  2. Failed to minify the code from this file:
  3. I try to use `@babel/preset-env to fix it
  4. I write a .baberc file but didn't work.

Expected Behavior

Compile my mirror-saga dependencies correctly.

Actual Behavior

$ firebase use default && react-app-env --env-file=.env.prod build
Now using alias default (opevere-game)
Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file: 

 	./node_modules/mirror-saga/src/index.js:4:28 

Read more here: http://bit.ly/2tRViJ9

Done in 18.24s.

.babelrc file:

{
    "presets": [
        ["@babel/preset-env", {
            "targets": {
                "esmodules": true,
                "browsers": ["last 2 versions", "safari >= 7"]
            }
        }]
    ]
}

error output:

$ head -n 10 ./node_modules/mirror-saga/src/index.js 
import sagaMiddleware from './middleware'
import addEffect from './effects'

export default (options = {}) => {
  const middlewares = options.middlewares || []
  // overwrite defaults
  return Object.assign(options, {
    middlewares: middlewares.concat([sagaMiddleware]),
    addEffect,
  })

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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