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 #3

Open
francisrod01 opened this issue Mar 18, 2018 · 2 comments
Open

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

francisrod01 opened this issue Mar 18, 2018 · 2 comments

Comments

@francisrod01
Copy link

francisrod01 commented Mar 18, 2018

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, 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

  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,
  })

image

Yes, it compile as well without mirror-saga.

image

@ShMcK
Copy link
Owner

ShMcK commented Mar 23, 2018

Sorry I haven't been very helpful or fast at responding to issues for this repo.

I haven't had much free time over the past few weeks to contribute to OS.

I no longer use this package, and currently use rematch instead of Mirror.

I think the simplest solution here is to mark this package as deprecated in the README. Feel free to fork it and take it over. Open source can be frustrating at times. My apologies.

@Timer
Copy link

Timer commented Mar 26, 2018

Using react-scripts@2 should fix this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants