graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

Plugin Creation fails uinexpectedly

Open jlmcmchl opened this issue 10 years ago • 15 comments

Expected Behavior

After cloning graylog-project and running ./scripts/bootstrap, running./scripts/bootstrap-plugin [plugin-name] should run successfully

Current Behavior

At the webpack step, it is unable to find vendor-manifest.json, and fails.

Context

This only popped up in the last week or so, so I'm not particularly sure why I'm only seeing this issue now and didn't see it before. While it is possible to develop plugins without this system, it's made significantly easier by having an automated way to setup the environment.

Steps to Reproduce

  1. git clone [email protected]:Graylog2/graylog-project.git && cd graylog-project
  2. ./scripts/bootstrap
  3. ./scripts/bootstrap-plugin [plugin-name]

Output:

[ERROR] module.js:327 [ERROR] throw err; [ERROR] ^ [ERROR] [ERROR] Error: Cannot find module 'C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog2-server\graylog2-web-interface\manifests\vendor-manifest.json' [ERROR] at Function.Module._resolveFilename (module.js:325:15) [ERROR] at Function.Module._load (module.js:276:25) [ERROR] at Module.require (module.js:353:17) [ERROR] at require (internal/module.js:12:17) [ERROR] at new PluginWebpackConfig (C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node_modules\graylog-web-plugin\lib\PluginWebpackConfig.js:21:25) [ERROR] at Object. (C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\webpack.config.js:6:18) [ERROR] at Module._compile (module.js:409:26) [ERROR] at Object.Module._extensions..js (module.js:416:10) [ERROR] at Module.load (module.js:343:32) [ERROR] at Function.Module._load (module.js:300:12) [ERROR] at Module.require (module.js:353:17) [ERROR] at require (internal/module.js:12:17) [ERROR] at module.exports (C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node_modules\webpack\bin\convert-argv.js:80:13) [ERROR] at Object. (C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node_modules\webpack\bin\webpack.js:39:40) [ERROR] at Module._compile (module.js:409:26) [ERROR] at Object.Module._extensions..js (module.js:416:10) [ERROR] [ERROR] npm ERR! Windows_NT 6.1.7601 [ERROR] npm ERR! argv "C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node\node.exe" "C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node\node_modules\npm\bin\npm-cli.js" "run" "build" [ERROR] npm ERR! node v4.4.3 [ERROR] npm ERR! npm v3.8.6 [ERROR] npm ERR! code ELIFECYCLE [ERROR] npm ERR! [email protected] build: webpack [ERROR] npm ERR! Exit status 1 [ERROR] npm ERR! [ERROR] npm ERR! Failed at the [email protected] build script 'webpack'. [ERROR] npm ERR! Make sure you have the latest version of node.js and npm installed. [ERROR] npm ERR! If you do, this is most likely a problem with the NotificationSubscription package, [ERROR] npm ERR! not with npm itself. [ERROR] npm ERR! Tell the author that this fails on your system: [ERROR] npm ERR! webpack [ERROR] npm ERR! You can get information on how to open an issue for this project with: [ERROR] npm ERR! npm bugs NotificationSubscription [ERROR] npm ERR! Or if that isn't available, you can get their info via: [ERROR] npm ERR! npm owner ls NotificationSubscription [ERROR] npm ERR! There is likely additional logging output above. [ERROR] [ERROR] npm ERR! Please include the following file with any support request: [ERROR] npm ERR! C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\npm-debug.log

npm-debug.log

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node\node.exe', 1 verbose cli 'C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'build' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle [email protected]~prebuild: [email protected] 6 silly lifecycle [email protected]~prebuild: no script for prebuild, continuing 7 info lifecycle [email protected]~build: [email protected] 8 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true 9 verbose lifecycle [email protected]~build: PATH: C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node\node_modules\npm\bin\node-gyp-bin;C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node_modules.bin;C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node;C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node;C:\Users\jmcmichael\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\jmcmichael\bin;C:\Python27;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared;C:\Program Files (x86)\Roxio\OEM\AudioCore;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Go\bin;C:\Users\jmcmichael\work\bin;C:\Program Files (x86)\WinMerge;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\Plex\Plex Manufacturing Cloud\1.4.0.1;C:\Program Files\MongoDB\bin;C:\Program Files\ElasticSearch\bin;C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5\sbin;C:\Program Files\Maven\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files\Oracle\VirtualBox;%USERPROFILE%.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio;C:\Users\jmcmichael\AppData\Roaming\npm;C:\Program Files\nodejs;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl; 10 verbose lifecycle [email protected]~build: CWD: C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription 11 silly lifecycle [email protected]~build: Args: [ '/d /s /c', 'webpack' ] 12 silly lifecycle [email protected]~build: Returned: code: 1 signal: null 13 info lifecycle [email protected]~build: Failed to exec build script 14 verbose stack Error: [email protected] build: webpack 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node\node_modules\npm\lib\utils\lifecycle.js:239:16) 14 verbose stack at emitTwo (events.js:87:13) 14 verbose stack at EventEmitter.emit (events.js:172:7) 14 verbose stack at ChildProcess. (C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node\node_modules\npm\lib\utils\spawn.js:24:14) 14 verbose stack at emitTwo (events.js:87:13) 14 verbose stack at ChildProcess.emit (events.js:172:7) 14 verbose stack at maybeClose (internal/child_process.js:827:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 15 verbose pkgid [email protected] 16 verbose cwd C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription 17 error Windows_NT 6.1.7601 18 error argv "C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node\node.exe" "C:\Users\jmcmichael\Desktop\Plugins\graylog-project\graylog-plugin-notification-subscription\node\node_modules\npm\bin\npm-cli.js" "run" "build" 19 error node v4.4.3 20 error npm v3.8.6 21 error code ELIFECYCLE 22 error [email protected] build: webpack 22 error Exit status 1 23 error Failed at the [email protected] build script 'webpack'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the NotificationSubscription package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error webpack 23 error You can get information on how to open an issue for this project with: 23 error npm bugs NotificationSubscription 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls NotificationSubscription 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

jlmcmchl avatar Nov 01 '16 15:11 jlmcmchl

@jlmcmchl Thanks for reporting this.

We'll release a new, improved version of the graylog-project repository in the near future which won't suffer from that error.

joschi avatar Nov 02 '16 07:11 joschi

@joschi any workaround in the meantime? we have some outstanding fixes for some plugins

omercnet avatar Nov 07 '16 16:11 omercnet

same here

@joschi any hints on when in the near future ?

erSitzt avatar Nov 24 '16 20:11 erSitzt

Hi,

The same issue in my case: vendor-manifest.json not found.

@joschi Please let us know if any fix/workaroud will be available.

lukaszpatyra avatar Dec 09 '16 08:12 lukaszpatyra

Hi, is there any progress on this? I'd need to create a plugin.

timyllym avatar Dec 12 '16 14:12 timyllym

@timyllym We'll publish our updated internal tooling after the release of Graylog 2.2.0.

joschi avatar Dec 12 '16 14:12 joschi

Still broken. Why is this issue closed?

ghost avatar Dec 15 '16 19:12 ghost

@r04r because there will be a new tooling project, so i guess it wont be fixed here... just read the above comments ;)

erSitzt avatar Dec 15 '16 19:12 erSitzt

@erSitzt the above comments don't have a reference to another issue logged anywhere else. There is no explanation that I can see for why this bug is closed or when it will be resolved. Not even sure what "internal tooling" means.

ronsmith avatar Jan 09 '17 19:01 ronsmith

@ronsmith if someone from the graylog core team sais that a new version of the tools to start a plugin project ( hence the "internal tooling" i guess ) is in the works and closes this issue i would guess this issue wont be fixed in the old version of the graylog-project.

erSitzt avatar Jan 09 '17 23:01 erSitzt

@ronsmith What @erSitzt said.

The current graylog-project project is deprecated and won't work with the latest version of Graylog. We're using a modified version of it internally, but we'll need some time to clean it up for public consumption. This will happen after the release of Graylog 2.2.0.

joschi avatar Jan 10 '17 08:01 joschi

FWIW, this might come too late, @jlmcmchl, but if you run mvn generate-resources in the directory of the checkout of graylog-project it should still work. The scripts are outdated, though, and will be replaced by a different tool as others have noted. Open sourcing that simply will take a bit more effort.

kroepke avatar Feb 06 '17 13:02 kroepke

@jlmcmchl the latest version (see the commit above) should fix the issue

kroepke avatar Feb 06 '17 13:02 kroepke

I just pulled down the latest version of this repo and I'm running into the same issue that others have stated above.

Running in development mode
Building vendor bundle.
Project is running at http://localhost:8080/
webpack output is served from /
404s will fallback to /index.html
Error: ENOENT: no such file or directory, open '/Users/maxorelus/Projects/graylog2-server/graylog2-web-interface/manifests/vendor-manifest.json'

The following is what I ran:

// node v8.1.3
// npm 5.3.0
npm install
npm start

Was there a resolution to this issue ever posted anywhere?

MaxOrelus avatar Aug 12 '17 21:08 MaxOrelus

Go into the graylog2-web-interface directory and run the following command

webpack --config webpack.vendor.js

After that, try to run your npm start again.

billmurrin avatar Aug 13 '17 02:08 billmurrin