graylog-labs/graylog-plugin-pagerduty

Error packaging

cuthbe opened this issue · 4 comments

Hi all, when running mvn package I am getting

[INFO] --- frontend-maven-plugin:1.6:yarn (yarn run build) @ graylog-plugin-pagerduty ---
[INFO] Running 'yarn run build' in /Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty
[INFO] yarn run v1.12.3
[INFO] $ webpack
[ERROR] /Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/webpack-cli/bin/cli.js:93
[ERROR] 				throw err;
[ERROR] 				^
[ERROR]
[ERROR] Error: Cannot find module '/Users/benjamincuthbert/dev/code/rnd/graylog2-server/graylog2-web-interface/manifests/vendor-manifest.json'
[ERROR]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
[ERROR]     at Function.Module._load (internal/modules/cjs/loader.js:506:25)
[ERROR]     at Module.require (internal/modules/cjs/loader.js:636:17)
[ERROR]     at require (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
[ERROR]     at new PluginWebpackConfig (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/graylog-web-plugin/lib/PluginWebpackConfig.js:25:25)
[ERROR]     at Object.<anonymous> (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/webpack.config.js:6:18)
[ERROR]     at Module._compile (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
[ERROR]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
[ERROR]     at Module.load (internal/modules/cjs/loader.js:598:32)
[ERROR]     at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
[ERROR]     at Function.Module._load (internal/modules/cjs/loader.js:529:3)
[ERROR]     at Module.require (internal/modules/cjs/loader.js:636:17)
[ERROR]     at require (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
[ERROR]     at WEBPACK_OPTIONS (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
[ERROR]     at requireConfig (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
[ERROR]     at /Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
[ERROR]     at Array.forEach (<anonymous>)
[ERROR]     at module.exports (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/webpack-cli/bin/utils/convert-argv.js:121:15)
[ERROR]     at yargs.parse (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/webpack-cli/bin/cli.js:71:45)
[ERROR]     at Object.parse (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/yargs/yargs.js:576:18)
[ERROR]     at /Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/webpack-cli/bin/cli.js:49:8
[ERROR]     at Object.<anonymous> (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/webpack-cli/bin/cli.js:366:3)
[ERROR]     at Module._compile (internal/modules/cjs/loader.js:688:30)
[ERROR]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
[ERROR]     at Module.load (internal/modules/cjs/loader.js:598:32)
[ERROR]     at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
[ERROR]     at Function.Module._load (internal/modules/cjs/loader.js:529:3)
[ERROR]     at Module.require (internal/modules/cjs/loader.js:636:17)
[ERROR]     at require (internal/modules/cjs/helpers.js:20:18)
[ERROR]     at Object.<anonymous> (/Users/benjamincuthbert/dev/code/rnd/graylog-plugin-pagerduty/node_modules/webpack/bin/webpack.js:156:2)
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Can you try running yarn run webpack --config webpack.vendor.js in /Users/benjamincuthbert/dev/code/rnd/graylog2-server/graylog2-web-interface once before doing the mvn package?

Thanks that worked.

Great to hear. I am leaving this issue open as a reminder to make this easier, either by documenting it or by making it unnecessary.

Thanks, yes so deploying the build I saw this in graylog

2020-09-28T09:57:58.990Z WARN  [PluginAssets] Unable to read web manifest from plugin PagerDutyNotificationPlugin 2.0.1-SNAPSHOT [org.graylog.plugins.pagerduty.PagerDutyNotificationPluginPlugin]:
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `org.graylog2.web.ModuleFiles`, problem: Null chunks
 at [Source: (sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream); line: 1, column: 125] (through reference chain: org.graylog2.web.ModuleManifest[“files”])
	at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67) ~[graylog.jar:?]
	at com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:1608) ~[graylog.jar:?]
	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapAsJsonMappingException(StdValueInstantiator.java:484) ~[graylog.jar:?]
	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.rewrapCtorProblem(StdValueInstantiator.java:503) ~[graylog.jar:?]
	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:285) ~[graylog.jar:?]
	at com.fasterxml.jackson.databind.deser.ValueInstantiator.createFromObjectWith(ValueInstantiator.java:229) ~[graylog.jar:?]