# Error using Netlify-CLI with Lerna

**URL:** <https://answers.netlify.com/t/error-using-netlify-cli-with-lerna/20978>\
**Category:** Support\
**Tags:** netlify-cli\
**Created:** [August 18, 2020, 12:25pm UTC](https://answers.netlify.com/t/error-using-netlify-cli-with-lerna/20978 "2020-08-18T12:25:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mortond](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/mortond/32/14529_2.png) [@mortond](https://answers.netlify.com/u/mortond)\
**Post date:** [August 18, 2020, 12:25pm UTC](https://answers.netlify.com/t/error-using-netlify-cli-with-lerna/20978/1 "2020-08-18T12:25:45Z")

</div>

development environment

```auto
    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**

```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**

```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:

```auto
    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.

```json
        "start": "lerna run start"    

```

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [August 24, 2020, 6:24pm UTC](https://answers.netlify.com/t/error-using-netlify-cli-with-lerna/20978/2 "2020-08-24T18:24:12Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [August 31, 2020, 8:44pm UTC](https://answers.netlify.com/t/error-using-netlify-cli-with-lerna/20978/3 "2020-08-31T20:44:07Z")

</div>

hi there,

would you mind filing an issue on this here:

> **[GitHub - netlify/cli: Netlify Command Line Interface](https://github.com/netlify/cli/)**
>
> Netlify Command Line Interface. Contribute to netlify/cli development by creating an account on GitHub.

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.
