Error using Netlify-CLI with Lerna

development environment

    System:
        OS: macOS 10.15.6
        CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
        Memory: 1.19 GB / 16.00 GB
        Shell: 5.7.1 - /bin/zsh
      Binaries:
        Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
        Yarn: 1.22.4 - ~/projects/test/node_modules/.bin/yarn
        npm: 6.14.4 - ~/.nvm/versions/node/v12.18.0/bin/npm

monorepo/package.json

    {
      "name": "workspace",
      "private": true,
      "version": "1.0.0",
      "workspaces": {
        "packages": [
          "packages/*"
        ]
      },
      "scripts": {
        "start": "lerna run start --stream"    
      },
      "devDependencies": {    
        "lerna": "^3.22.1"
      }  
    }

monorepo/packages/app/package.json

    {
      "name": "app",
      "version": "0.0.1",
      "private": true,
      "dependencies": {
        "netlify-cli": "^2.59.0",
        "react": "^16.12.0",
        "react-scripts": "3.4.0"
      },
      "scripts": {
        "start": "netlify dev -c 'yarn dev'",
        "dev": "react-scripts start"
      },
      "eslintConfig": {
        "extends": [
          "react-app"
        ]
      },
      "browserslist": {
        "production": [
          ">0.2%",
          "not dead",
          "not op_mini all"
        ],
        "development": [
          "last 1 chrome version",
          "last 1 firefox version",
          "last 1 safari version"
        ]
      }
    }

running yarn start from root

results in:

    yarn start
    yarn run v1.22.4
    $ lerna run start --stream
    lerna notice cli v3.22.1
    lerna info versioning independent
    lerna info Executing command in 1 package: "yarn run start"
    app: $ netlify dev -c 'yarn dev'
    app: ◈ Netlify Dev ◈
    app: ◈ Overriding command with setting derived from netlify.toml [dev] block:  yarn dev
    app: ◈ Starting Netlify Dev with create-react-app
    app: ◈ Functions server is listening on 65353
    app: /Users/mortond/projects/monorepo/node_modules/netlify-redirector/lib/redirects.js:116
    app:       throw ex;
    app:       ^
    app: TypeError: dest.end is not a function
    app:     at ReadStream.onend (_stream_readable.js:682:10)
    app:     at Object.onceWrapper (events.js:421:28)
    app:     at ReadStream.emit (events.js:327:22)
    app:     at endReadableNT (_stream_readable.js:1221:12)
    app:     at processTicksAndRejections (internal/process/task_queues.js:84:21)
    app: error Command failed with exit code 7.
    app: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    lerna ERR! yarn run start exited 7 in 'app'
    error Command failed with exit code 7.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

if I cd packages/app and run yarn start it works fine.

Hmm it seems to be related to the --stream option of lerna, removing it allows everything to work, but with no console output.

        "start": "lerna run start"    

hi there, thanks for your patience - we have been a little short staffed. I am going to try and ask my colleague to take at this tomrrow for you!

hi there,

would you mind filing an issue on this here:

that is really the best place for this - sorry we’ve been sluggish to get you answers, but we’re not quite sure what to suggest. the folks on the CLI team will likely have more insight for you.