Got an eslint error when install

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.

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

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?

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.

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