Content
You are here:
Installation fails on webpack configuration
Added by Marc Joos almost 9 years ago
Dear all,
When I try to install OpenProject, installation fails on the configuration step. When I launch:
openproject [re]configure
I get the following:
(npm bin)/webpack --config webpack.config.js /opt/openproject/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/shared_helpers.rb:78: warning: Insecure world writable dir /opt/soft in PATH, mode 040777 ^ SyntaxError: Unexpected token / at Object.parse (native) at Object.<anonymous> (/opt/openproject/frontend/rails-plugins.conf.js:49:17) at Object.memoized [as allPluginNamesPaths] (/opt/openproject/frontend/node_modules/lodash/dist/lodash.js:5570:32) at Object.OpenProjectPlugins.pluginNamesPaths (/opt/openproject/frontend/rails-plugins.conf.js:53:26) at Object.<anonymous> (/opt/openproject/frontend/rails-plugins.conf.js:75:56) at Module._compile (module.js:413:34) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32) at Function.Module._load (module.js:314:12) at Module.require (module.js:367:17) rake aborted! Command failed with status (1): [$(npm bin)/webpack --config webpack.config...] /opt/openproject/lib/tasks/assets.rake:48:in `block (3 levels) in <top (required)>' /opt/openproject/lib/tasks/assets.rake:47:in `chdir' /opt/openproject/lib/tasks/assets.rake:47:in `block (2 levels) in <top (required)>' /opt/openproject/lib/tasks/packager.rake:54:in `block (2 levels) in <top (required)>' Tasks: TOP => assets:precompile => assets:compile_environment => assets:webpack (See full trace by running task with --trace)
On the other hand, if I run independently
$(npm bin)/webpack --config webpack.config.js
in frontend/, it does work without problem…
What could I do to end OpenProject configuration?
I’m running under RHEL7.
Thanks by advance!
Replies (8)
It seems that my Ruby version was too old (2.0) so I installed a newer version of Ruby (2.3.0) via RVM.
Then, I tried different things but everything is failing. First, I try to rerun:
But I get an error message:
I don’t get it since ruby -v tells me:
And I don’t get where I could change this in the configuration process of OpenProject (the config:set is rather obscure).
Second, I tried to configure things manually.
worked and everything seems to be OK. My database is set, and:
both succeeded. Then, when I launched:
it failed once again:
I don’t really get what is happening; I tried to reinstall gems; for example, I ran:
but I still get the same error.
I don’t know what to try next.
Any help would be greatly appreciated!
Hi Marc,
The webpack process uses the output of
./bin/plugin_info
to infer about installed plugins in OpenProject in order to process their assets.As it parses the output as JSON, and your output seems to include the following line:
Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi
, the process seems to fail.I’ll try to look into why that would be included in the output (since that warning should land in STDERR instead), but you may continue trying to fix the ffi issue in order to resolve the issue.
Best,
Oliver
Hi Olivier,
Thanks for your answer.
I don’t get though which JSON is read and where it is located. Perhaps I could just delete the faulting lines. Or try to regenerate this file, but I don’t get how I could do that. In the mean time, I reinstalled all the missing dependencies (ffi, kgio and so on) but still get the same error message.
Best,
Marc
The JSON parsed by webpack is the output of
<Your OpenProject root>./bin/plugin_info
.You can run that file manually and it will print that ffi warning.
Best,
Oliver
Could you also try to run the pristine command in context of the OpenProject user as follows?
openproject run gem pristine ffi --version=1.9.10
Best,
Oliver
Thanks for your answers.
If I run
I get:
I don’t see the ffi warning.
If I run (as openproject user):
I get:
What draws my attention is that it seems to look for ffi in [OpenProject root]./vendor/bundle/ruby/2.1.0 whereas I am using Ruby 2.3.0… So it seems that there are some confusion with my Ruby versions; I don’t know how to force OpenProject to use 2.3.0 to try to circumvent the issue.
Thanks again,
Marc
Hey Marc,
the packaged installation of OpenProject ships with its own ruby instance. If you start forcing other ruby versions on there, we cannot really find out what’s going on exactly.
Please inspect the env to ensure that if you’re running as the openproject user, it uses the bundled ruby.
(You can spawn a shell with
openproject run bash
).Best,
Oliver
OK, I didn’t get that it ships with its own Ruby instance.
I started again from a clean slate (I remove OpenProject with my package manager, delete the /opt/openproject directory and reinstalled it); this time the configuration step worked fine and OpenProject is smoothly running. I guess all the fiddling I did with Ruby corrected the ruby problems I got in the meantime.
Thanks again for your help!
Marc