Error while building package from Source Code

yarn build --rpm yarn run v1.16.0 node scripts/build --all-platforms --rpm

C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:42419
var e = new Error("Cannot find module '" + req + "'");
^
Error: Cannot find module 'static-extend'
at webpackEmptyContext (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:42419:10)
at Function.getter [as staticExtend] (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:42282:42)
at Object.module.exports.cu.extend (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:42188:16)
at namespace (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:40406:29)
at Object. (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:40498:18)
at webpack_require (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:21:30)
at Object. (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:39891:12)
at webpack_require (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:21:30)
at Object. (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:39771:18)
at webpack_require (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:21:30)
at Object. (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:34198:14)
at webpack_require (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:21:30)
at Object. (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:33302:14)
at webpack_require (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:21:30)
at Object. (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:32920:18)
at webpack_require (C:\Users\Admin\kibana\packages\kbn-pm\dist\index.js:21:30)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Try running yarn kbn bootstrap before running yarn build.

Yup. yarn kbn bootstrap was successful. Only Error in yarn build. After getting that error even yarn kbn bootstrap fails

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

I just hit this too. I'm also on Windows (10 for me).

I discovered that git status showed a modified packages/kbn-pm/dist/index.js file.

So I did a git reset --hard HEAD and now I'm able to yarn kbn bootstrap again.

1 Like