Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build graylog anymore due to yarn build error #7731

Closed
radykal-com opened this issue Mar 22, 2020 · 5 comments · Fixed by #7733
Closed

Unable to build graylog anymore due to yarn build error #7731

radykal-com opened this issue Mar 22, 2020 · 5 comments · Fixed by #7733

Comments

@radykal-com
Copy link
Contributor

Hi,

I used to be able to build graylog locally without many troubles until now. The mvn compile always fails with this error:

[INFO]     ERROR in ./node_modules/graylog-web-plugin/plugin.js
[INFO]     Module not found: Error: Can't resolve './lib/PluginManifest' in '/Users/radykal/Projects/graylog-project-repos/graylog2-server/graylog2-web-interface/node_modules/graylog-web-plugin'
[INFO]      @ ./node_modules/graylog-web-plugin/plugin.js 2:18-49
[INFO]      @ ./src/index.jsx
[INFO]
[INFO]     ERROR in ./node_modules/graylog-web-plugin/plugin.js
[INFO]     Module not found: Error: Can't resolve './lib/PluginStore' in '/Users/radykal/Projects/graylog-project-repos/graylog2-server/graylog2-web-interface/node_modules/graylog-web-plugin'
[INFO]      @ ./node_modules/graylog-web-plugin/plugin.js 3:15-43
[INFO]      @ ./src/index.jsx
[INFO]     Child html-webpack-plugin for "index.html":
[INFO]          1 asset
[INFO]         Entrypoint undefined = index.html
[INFO]         [9YbPW59L] (webpack)/buildin/module.js 497 bytes {639f79af-0} [built]
[INFO]         [aY11sVfy] (webpack)/buildin/global.js 472 bytes {639f79af-0} [built]
[INFO]         [i/dVZhsi] ./node_modules/html-webpack-plugin/lib/loader.js!./templates/index.html.template 1.52 KiB {639f79af-0} [built]
[INFO]             + 1 hidden module
[INFO]     Child html-webpack-plugin for "module.json":
[INFO]          1 asset
[INFO]         Entrypoint undefined = module.json
[INFO]         [1S/p2sYH] ./node_modules/html-webpack-plugin/lib/loader.js!./templates/module.json.template 379 bytes {639f79af-0} [built]
[INFO]         [9YbPW59L] (webpack)/buildin/module.js 497 bytes {639f79af-0} [built]
[INFO]         [aY11sVfy] (webpack)/buildin/global.js 472 bytes {639f79af-0} [built]
[INFO]             + 1 hidden module
[INFO] error Command failed with exit code 2.
[INFO] error Command failed with exit code 2.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for graylog-project 3.3.0-SNAPSHOT:
[INFO]
[INFO] Graylog Parent POM ................................. SUCCESS [  0.003 s]
[INFO] Graylog Project Parent POM ......................... SUCCESS [  0.123 s]
[INFO] Graylog ............................................ FAILURE [02:56 min]

My local env is as follows:

[radykal@macbook-pro.local]➜ ~/Projects/graylog-project(master|…) $ graylog-project version
Version 0.22.0, built on 2019-07-20T08:54:07+0000 (revision 1ef2728)
[radykal@macbook-pro.local]➜ ~/Projects/graylog-project(master|…) $ graylog-project status
Current project status
  Manifests: [manifests/master.json]
  Module versions
    graylog-parent               3.3.0-SNAPSHOT (branch: master)
    graylog-plugin-collector     3.3.0-SNAPSHOT (branch: master, parent: 3.3.0-SNAPSHOT)
    graylog-plugin-aws           3.3.0-SNAPSHOT (branch: master, parent: 3.3.0-SNAPSHOT)
    graylog-plugin-threatintel   3.3.0-SNAPSHOT (branch: master, parent: 3.3.0-SNAPSHOT)
    graylog-plugin-integrations  3.3.0-SNAPSHOT (branch: master, parent: 3.3.0-SNAPSHOT)

The only issue I found with similar error is this one https://community.graylog.org/t/request-help-for-the-contribution-documentation/898/10
So I ran graylog-project npm-clean to delete all node and node_modules dirs from all repos but same error appears.

Dunno what to do, I was about to help with some open issues but after 2+ hours trying to fix the build to even start is very frustrating. Can someone help?

@bernd
Copy link
Member

bernd commented Mar 23, 2020

I am seeing the same issue when building only the server:

Build output
[INFO] --- frontend-maven-plugin:1.8.0:yarn (yarn run build) @ graylog2-server ---
[INFO] Running 'yarn run build' in /home/bernd/graylog/master/graylog-project-repos/graylog2-server/graylog2-web-interface
[INFO] yarn run v1.19.2
[INFO] $ disable_plugins=true webpack --config webpack.bundled.js
[INFO] Running in production mode
[INFO] Building vendor bundle.
[INFO] clean-webpack-plugin: /home/bernd/graylog/master/graylog-project-repos/graylog2-server/graylog2-web-interface/target/web/build has been removed.
[INFO] Hash: 668a30f53c022c34b60bd56548dee47f56189ddf
[INFO] Version: webpack 4.41.5
[INFO] Child vendor:
[INFO]     Hash: 668a30f53c022c34b60b
[INFO]     Time: 9089ms
[INFO]     Built at: 03/23/2020 10:22:54 AM
[INFO]                              Asset      Size  Chunks                                Chunk Names
[INFO]     vendor.568b371fc289f0c00fa3.js  1.16 MiB       0  [emitted] [immutable]  [big]  vendor
[INFO]     Entrypoint vendor [big] = vendor.568b371fc289f0c00fa3.js
[INFO]      [25] ./node_modules/moment/locale sync ^\.\/.*$ 3 KiB {0} [built]
[INFO]     [338] dll vendor 12 bytes {0} [built]
[INFO]     [354] (webpack)/buildin/module.js 497 bytes {0} [built]
[INFO]     [613] (webpack)/buildin/global.js 472 bytes {0} [built]
[INFO]         + 531 hidden modules
[INFO]     
[INFO]     WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
[INFO]     This can impact web performance.
[INFO]     Assets: 
[INFO]       vendor.568b371fc289f0c00fa3.js (1.16 MiB)
[INFO]     
[INFO]     WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
[INFO]     Entrypoints:
[INFO]       vendor (1.16 MiB)
[INFO]           vendor.568b371fc289f0c00fa3.js
[INFO]     
[INFO]     
[INFO]     WARNING in webpack performance recommendations: 
[INFO]     You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
[INFO]     For more info visit https://webpack.js.org/guides/code-splitting/
[INFO] Child app:
[INFO]     Hash: d56548dee47f56189ddf
[INFO]     Time: 99639ms
[INFO]     Built at: 03/23/2020 10:24:33 AM
[INFO]      464 assets
[INFO]     Entrypoint app = app.d56548dee47f56189ddf.js app.d56548dee47f56189ddf.js.map
[INFO]     Entrypoint builtins = builtins.d56548dee47f56189ddf.js builtins.d56548dee47f56189ddf.js.map
[INFO]     Entrypoint polyfill = polyfill.d56548dee47f56189ddf.js polyfill.d56548dee47f56189ddf.js.map
[INFO]     [0] multi ./src/injection/builtins.js 28 bytes {36a2c657-29} [built]
[INFO]     [1] multi @babel/polyfill 28 bytes {36a2c657-30} [built]
[INFO]     [1VnJesae] ./src/injection/StoreProvider.jsx 1.37 KiB {36a2c657-28} {36a2c657-29} [built]
[INFO]     [4KF7VOU5] delegated ./node_modules/reflux/src/index.js from dll-reference __vendor 42 bytes {36a2c657-28} {36a2c657-29} [built]
[INFO]     [6aqzefQH] delegated ./node_modules/timers-browserify/main.js from dll-reference __vendor 42 bytes {36a2c657-28} {36a2c657-29} [built]
[INFO]     [95eaLShZ] ./src/index.jsx + 143 modules 476 KiB {36a2c657-28} [built]
[INFO]         | ./src/index.jsx 1.01 KiB [built]
[INFO]         | ./src/webpack-entry.js 446 bytes [built]
[INFO]         | ./src/routing/AppFacade.jsx 2.81 KiB [built]
[INFO]         | ./src/views/bindings.jsx 15 KiB [built]
[INFO]         | ./src/pages/ServerUnavailablePage.jsx 7.69 KiB [built]
[INFO]         | ./src/theme/GlobalThemeStyles.jsx 10.4 KiB [built]
[INFO]         | ./src/views/logic/searchtypes/messages/index.js 126 bytes [built]
[INFO]         | ./src/views/logic/fieldactions/AddToTableActionHandler.js 1010 bytes [built]
[INFO]         | ./src/views/logic/fieldactions/AddToAllTablesActionHandler.js 654 bytes [built]
[INFO]         | ./src/views/logic/valueactions/AddToQueryHandler.js 3.69 KiB [built]
[INFO]         | ./src/views/logic/fieldactions/AggregateActionHandler.js 1.18 KiB [built]
[INFO]         | ./src/views/logic/fieldactions/ChartActionHandler.js 2.13 KiB [built]
[INFO]         | ./src/views/logic/searchtypes/events/EventHandler.js 3.59 KiB [built]
[INFO]         | ./src/views/logic/aggregationbuilder/visualizations/LineVisualizationConfig.js 4.87 KiB [built]
[INFO]         | ./src/views/logic/aggregationbuilder/visualizations/NumberVisualizationConfig.js 5.37 KiB [built]
[INFO]         |     + 129 hidden modules
[INFO]     [B1JLyk3Y] ./src/views/logic/aggregationbuilder/Series.js 5.38 KiB {36a2c657-28} [built]
[INFO]     [CL+pbkWF] ./src/views/hooks/BindSearchParamsFromQuery.js 2.53 KiB {36a2c657-28} [built]
[INFO]     [CzyxmveH] delegated ./node_modules/styled-components/dist/styled-components.browser.esm.js from dll-reference __vendor 42 bytes {36a2c657-28} [built]
[INFO]     [ILDPzkX3] ./src/views/Constants.js 1.1 KiB {36a2c657-28} {36a2c657-29} [built]
[INFO]     [JU0fJHqs] ./src/pages/LoginPage.jsx + 1 modules 6.51 KiB {36a2c657-23} [built]
[INFO]         | ./src/pages/LoginPage.jsx 3.23 KiB [built]
[INFO]         |     + 1 hidden module
[INFO]     [Y/FKx0zi] delegated ./node_modules/react-dom/index.js from dll-reference __vendor 42 bytes {36a2c657-28} [built]
[INFO]     [ivGQtwpr] delegated ./node_modules/react/index.js from dll-reference __vendor 42 bytes {36a2c657-28} [built]
[INFO]     [kx12hYYX] ./src/theme/GraylogThemeProvider.jsx 590 bytes {36a2c657-28} [built]
[INFO]     [s1qejPic] ./src/injection/builtins.js + 1 modules 14 KiB {36a2c657-29} [built]
[INFO]         | ./src/injection/builtins.js 85 bytes [built]
[INFO]         | ./src/injection/registerBuiltinStores.js 13.9 KiB [built]
[INFO]         + 2170 hidden modules
[INFO]     
[INFO]     ERROR in ./node_modules/graylog-web-plugin/plugin.js
[INFO]     Module not found: Error: Can't resolve './lib/PluginManifest' in '/home/bernd/graylog/master/graylog-project-repos/graylog2-server/graylog2-web-interface/node_modules/graylog-web-plugin'
[INFO]      @ ./node_modules/graylog-web-plugin/plugin.js 2:18-49
[INFO]      @ ./src/index.jsx
[INFO]     
[INFO]     ERROR in ./node_modules/graylog-web-plugin/plugin.js
[INFO]     Module not found: Error: Can't resolve './lib/PluginStore' in '/home/bernd/graylog/master/graylog-project-repos/graylog2-server/graylog2-web-interface/node_modules/graylog-web-plugin'
[INFO]      @ ./node_modules/graylog-web-plugin/plugin.js 3:15-43
[INFO]      @ ./src/index.jsx
[INFO]     Child html-webpack-plugin for "index.html":
[INFO]          1 asset
[INFO]         Entrypoint undefined = index.html
[INFO]         [9YbPW59L] (webpack)/buildin/module.js 497 bytes {36a2c657-0} [built]
[INFO]         [aY11sVfy] (webpack)/buildin/global.js 472 bytes {36a2c657-0} [built]
[INFO]         [i/dVZhsi] ./node_modules/html-webpack-plugin/lib/loader.js!./templates/index.html.template 1.52 KiB {36a2c657-0} [built]
[INFO]             + 1 hidden module
[INFO]     Child html-webpack-plugin for "module.json":
[INFO]          1 asset
[INFO]         Entrypoint undefined = module.json
[INFO]         [1S/p2sYH] ./node_modules/html-webpack-plugin/lib/loader.js!./templates/module.json.template 379 bytes {36a2c657-0} [built]
[INFO]         [9YbPW59L] (webpack)/buildin/module.js 497 bytes {36a2c657-0} [built]
[INFO]         [aY11sVfy] (webpack)/buildin/global.js 472 bytes {36a2c657-0} [built]
[INFO]             + 1 hidden module
[INFO] error Command failed with exit code 2.
[INFO] error Command failed with exit code 2.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Graylog Parent POM 3.3.0-SNAPSHOT:
[INFO] 
[INFO] Graylog Parent POM ................................. SUCCESS [  0.144 s]
[INFO] Graylog Project Parent POM ......................... SUCCESS [  0.043 s]
[INFO] Graylog ............................................ FAILURE [02:46 min]
[INFO] integration-tests .................................. SKIPPED
[INFO] Graylog Plugin Parent POM .......................... SKIPPED
[INFO] Graylog Plugin with Web support Parent POM ......... SKIPPED
[INFO] graylog-plugin-archetype ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:46 min
[INFO] Finished at: 2020-03-23T10:24:34+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.8.0:yarn (yarn run build) on project graylog2-server: Failed to run task: 'yarn run build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :graylog2-server

I will move this to the server repository.

@bernd bernd transferred this issue from Graylog2/graylog-project Mar 23, 2020
@radykal-com
Copy link
Contributor Author

Ok! thanks you

@Hmemories
Copy link

I met the same issue yesterday. It has made me confused for long time. Could you tell me when can you solve this problem, please?

@radykal-com
Copy link
Contributor Author

If this is a blocking issue for the maintainers they will fix it ASAP.

@Hmemories
Copy link

OK!Thank you

bernd added a commit that referenced this issue Mar 23, 2020
This fixes the following error when running "npm install" in
graylog-web-plugin:

  error: [BABEL] graylog2-web-interface/packages/graylog-web-plugin/src/PluginManifest.js:
    Could not find plugin "proposal-numeric-separator". Ensure there is an
    entry in ./available-plugins.js for it.

Related PR in babel: babel/babel#11201

Fixes #7731
dennisoelkers pushed a commit that referenced this issue Mar 23, 2020
…7733)

This fixes the following error when running "npm install" in
graylog-web-plugin:

  error: [BABEL] graylog2-web-interface/packages/graylog-web-plugin/src/PluginManifest.js:
    Could not find plugin "proposal-numeric-separator". Ensure there is an
    entry in ./available-plugins.js for it.

Related PR in babel: babel/babel#11201

Fixes #7731
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants