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

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

Closed
francisrod01 opened this issue Mar 17, 2018 · 2 comments
Closed

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

francisrod01 opened this issue Mar 17, 2018 · 2 comments

Comments

@francisrod01
Copy link

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,
  })
@ShMcK
Copy link

ShMcK commented Mar 18, 2018

Does it compile correctly if you remove "mirror-saga" and code associated with it?

I'm not sure that this is a create-react-app issue.

@francisrod01
Copy link
Author

francisrod01 commented Mar 18, 2018

Yes, it compile as well without mirror-saga.
Sorry, it not a create-react-app issue.

There is the issue: ShMcK/mirror-saga#3

@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants