# Got an eslint error when install

**URL:** <https://discuss.elastic.co/t/got-an-eslint-error-when-install/196696>\
**Category:** Kibana\
**Created:** [August 26, 2019, 3:58am UTC](https://discuss.elastic.co/t/got-an-eslint-error-when-install/196696 "2019-08-26T03:58:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yangz](https://avatars.discourse-cdn.com/v4/letter/y/df705f/32.png) [@yangz](https://discuss.elastic.co/u/yangz)\
**Post date:** [August 26, 2019, 3:58am UTC](https://discuss.elastic.co/t/got-an-eslint-error-when-install/196696/1 "2019-08-26T03:58:06Z")

</div>

kibana: 7.1.1  
node: 10.15.2  
yarn: 1.16.0  
os: mac os 10.14.5  
P.S. behind proxy

yarn kbn bootstrap:

```
@kbn/config-schema: $ yarn build
@elastic/datemath: $ yarn build --quiet
@kbn/config-schema: $ tsc
@elastic/datemath: $ babel src --out-dir target --copy-files --quiet
@kbn/config-schema: ../../node_modules/typescript/lib/lib.es2019.object.d.ts(28,81): error TS2322: Type 'string | number | symbol' is not assignable to type 'string'.
@kbn/config-schema: Type 'number' is not assignable to type 'string'.
@kbn/config-schema: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
✖ @kbn/config-schema: error Command failed with exit code 2.
@kbn/config-schema: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
✖ @kbn/config-schema: error Command failed with exit code 2.

[bootstrap] failed:

Error: Command failed: yarn run kbn:bootstrap
error Command failed with exit code 2.
error Command failed with exit code 2.

$ yarn build
$ tsc
../../node_modules/typescript/lib/lib.es2019.object.d.ts(28,81): error TS2322: Type 'string | number | symbol' is not assignable to type 'string'.
Type 'number' is not assignable to type 'string'.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

at makeError (/Users/lidan/suning/kibana-7.1.1/packages/kbn-pm/dist/index.js:14155:9)
at Promise.all.then.arr (/Users/lidan/suning/kibana-7.1.1/packages/kbn-pm/dist/index.js:14259:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [August 26, 2019, 11:05am UTC](https://discuss.elastic.co/t/got-an-eslint-error-when-install/196696/2 "2019-08-26T11:05:02Z")

</div>

Hi @yangz,  
this doesn't seems an eslint error but more a `tsc` error when compiling typescript files.

Can you try to run `yarn kbn clean` before the `yarn kbn bootstrap`? that should clean the existing node modules.  
If that doesn't help I think we should check the yarn.lock file as specified in this other post: [Error while running 6.8 yarn kbn bootstrap](https://discuss.elastic.co/t/error-while-running-6-8-yarn-kbn-bootstrap/189326/3)

---

<div class="post-metadata">

**Author:** ![yangz](https://avatars.discourse-cdn.com/v4/letter/y/df705f/32.png) [@yangz](https://discuss.elastic.co/u/yangz)\
**Post date:** [August 27, 2019, 1:44am UTC](https://discuss.elastic.co/t/got-an-eslint-error-when-install/196696/3 "2019-08-27T01:44:48Z")

</div>

Thanks for your reply.I tried to run `yarn kbn clean` and delete the yarn.lock file before the `yarn kbn bootstrap`,but i still got the error.But it remind me to copy the yarn.lock file from github,and it was installed successsfully.  
Now i cant understand why the `yarn kbn bootstrap` depend on the yarn.lock file?

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [August 30, 2019, 12:36pm UTC](https://discuss.elastic.co/t/got-an-eslint-error-when-install/196696/4 "2019-08-30T12:36:36Z")

</div>

The `yarn.lock` file describe the exact version and the dependency tree of all node modules installed in kibana. The `package.json` just describe the dependency and their versions but the versions configured can be an interval/range not precise versions.  
To keep consistency across multiple installation/machines yarn use either the package and the lockfile.

> **[Yarn](https://yarnpkg.com/lang/en/docs/yarn-lock/)**
>
> Fast, reliable, and secure dependency management.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 27, 2019, 12:36pm UTC](https://discuss.elastic.co/t/got-an-eslint-error-when-install/196696/5 "2019-09-27T12:36:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
