Created plugin, runs locally, won't build

Hello all!

I'm having trouble finding help on this issue please.

I've created a Kibana plugin following this: https://github.com/elastic/kibana/tree/master/packages/kbn-plugin-generator

When I run 'yarn build' it fails on this step:

info Running script [build] in [@kbn/pm]:
$ webpack
Hash: 64dd71bb7dc195ae32df
Version: webpack 4.44.1
Time: 2492ms
Built at: 08/12/2020 3:26:55 PM
   Asset      Size  Chunks             Chunk Names
index.js  2.18 MiB       0  [emitted]  index
Entrypoint index = index.js
  [0] ./src/index.ts 1.09 KiB {0} [built]
  [1] ./src/cli.ts 3.5 KiB {0} [built]
  [4] external "path" 42 bytes {0} [built]
  [5] ../kbn-dev-utils/target/tooling_log/index.js 1.79 KiB {0} [built]
[112] external "util" 42 bytes {0} [built]
[127] ./src/commands/index.ts 1.06 KiB {0} [built]
[130] ./src/utils/fs.ts 3.02 KiB {0} [built]
[133] external "fs" 42 bytes {0} [built]
[143] ./src/utils/log.ts 1.54 KiB {0} [built]
[145] ./src/utils/projects.ts 6.3 KiB {0} [built]
[162] ./src/utils/errors.ts 921 bytes {0} [built]
[163] ./src/utils/project.ts 8.25 KiB {0} [built]
[261] ./src/utils/workspaces.ts 2.82 KiB {0} [built]
[262] ./src/config.ts 2.54 KiB {0} [built]
[473] ./src/production/index.ts 954 bytes {0} [built]
    + 678 hidden modules

ERROR in /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js
Module not found: Error: Can't resolve 'spdx-exceptions' in '/Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse'
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js 6:17-43
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/index.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/normalize-package-data/lib/fixer.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/normalize-package-data/lib/normalize.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/read-pkg/index.js
 @ ./src/utils/package_json.ts
 @ ./src/utils/workspaces.ts
 @ ./src/index.ts

ERROR in /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-correct/index.js
Module not found: Error: Can't resolve 'spdx-license-ids' in '/Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-correct'
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-correct/index.js 17:21-48
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/index.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/normalize-package-data/lib/fixer.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/normalize-package-data/lib/normalize.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/read-pkg/index.js
 @ ./src/utils/package_json.ts
 @ ./src/utils/workspaces.ts
 @ ./src/index.ts

ERROR in /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js
Module not found: Error: Can't resolve 'spdx-license-ids' in '/Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse'
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js 4:10-37
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/index.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/normalize-package-data/lib/fixer.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/normalize-package-data/lib/normalize.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/read-pkg/index.js
 @ ./src/utils/package_json.ts
 @ ./src/utils/workspaces.ts
 @ ./src/index.ts

ERROR in /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js
Module not found: Error: Can't resolve 'spdx-license-ids/deprecated' in '/Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse'
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js 5:10-48
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/validate-npm-package-license/index.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/normalize-package-data/lib/fixer.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/normalize-package-data/lib/normalize.js
 @ /Users/bababrownbear/Downloads/kibana/node_modules/read-pkg/index.js
 @ ./src/utils/package_json.ts
 @ ./src/utils/workspaces.ts
 @ ./src/index.ts

Any suggestions on how to resolve please? What other information would be helpful?

Hi @bababrownbear,
that's strange, just to confirm you've executed 'yarn kbn bootstrap' before trying to build?

Yes. I chalked it up to my environment (Mac) and loaded the entire setup again in an Ubuntu VirtualBox.

I am able to build now, but my build output can’t be installed. I outlined more in this github issues comment.

Could you take a look please @Marta_Bondyra?

I am not able to install my plugin.

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