添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
开朗的路灯  ·  googletest/googletest/ ...·  2 周前    · 
焦虑的双杠  ·  Bazel build cache · ...·  1 周前    · 
无聊的大熊猫  ·  LINK : fatal error ...·  1 周前    · 
稳重的刺猬  ·  Undefined references ...·  1 周前    · 
不爱学习的柠檬  ·  GitHub - ...·  3 天前    · 
追风的匕首  ·  Error importing an ...·  2 月前    · 
个性的红酒  ·  如何在使用C++ ...·  6 月前    · 
Your browser is outdated and unsupported. You may run into errors and degraded experience on this page. Please update your browser.
  • Help and support
  • User guides
  • Videos
  • Shortcuts
  • Community forum
  • Enterprise support

  • Additional resources
  • Data privacy and security policy
  • Digital accessibility (DE)
  • OpenProject website
  • Security alerts / Newsletter
  • OpenProject blog
  • Release notes
  • Report a bug
  • Development roadmap
  • Add and edit translations
  • API documentation
  • Sign in

      Added by Roman A over 5 years ago

      After upgrading to v 8.3.0, I am no longer able to compile the frontend using RAILS_ENV="production" bundle exec rake assets:precompile

      I haven't found any posts with exactly the same issue.. Can anybody point me into the right direction what I need to do to solve this?

      0 info it worked if it ends with ok
      1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', '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 verbose lifecycle [email protected]~prebuild: unsafe-perm in lifecycle true
      7 verbose lifecycle [email protected]~prebuild: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/openproject/frontend/node_modules/.bin:/opt/openproject/vendor/bundle/ruby/2.6.0/bin:/opt/openproject/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/root/.local/bin:/root/bin:/root/.rbenv/bin:/root/.nodenv/bin
      8 verbose lifecycle [email protected]~prebuild: CWD: /opt/openproject/frontend
      9 silly lifecycle [email protected]~prebuild: Args: [ '-c', './scripts/link_plugin_placeholder.js' ]
      10 silly lifecycle [email protected]~prebuild: Returned: code: 0  signal: null
      11 info lifecycle [email protected]~build: [email protected]
      12 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
      13 verbose lifecycle [email protected]~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/openproject/frontend/node_modules/.bin:/opt/openproject/vendor/bundle/ruby/2.6.0/bin:/opt/openproject/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/root/.local/bin:/root/bin:/root/.rbenv/bin:/root/.nodenv/bin
      14 verbose lifecycle [email protected]~build: CWD: /opt/openproject/frontend
      15 silly lifecycle [email protected]~build: Args: [ '-c', 'ng build --prod && npm run legacy-webpack' ]
      16 info lifecycle [email protected]~build: Failed to exec build script
      17 verbose stack Error: [email protected] build: `ng build --prod && npm run legacy-webpack`
      17 verbose stack spawn ENOENT
      17 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
      17 verbose stack     at ChildProcess.emit (events.js:182:13)
      17 verbose stack     at maybeClose (internal/child_process.js:962:16)
      17 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
      18 verbose pkgid [email protected]
      19 verbose cwd /opt/openproject/frontend
      20 verbose Linux 4.4.0-042stab134.8
      21 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
      22 verbose node v10.13.0
      23 verbose npm  v6.9.0
      24 error file sh
      25 error code ELIFECYCLE
      26 error errno ENOENT
      27 error syscall spawn
      28 error [email protected] build: `ng build --prod && npm run legacy-webpack`
      28 error spawn ENOENT
      29 error Failed at the [email protected] build script.
      29 error This is probably not a problem with npm. There is likely additional logging output above.
      30 verbose exit [ 1, true ]
                

      Hi Roman,

      the error `26 error errno ENOENT` typically hints at the process being killed due to being out of memory. Node has a default process RAM limit of 1.9G and may be getting killed by your system. Either try setting --max-old-size option, reduce your OOM killer setting or add a swap file.

      Best,

      Oliver

      Hi Oliver

      Thank you for your reply. I am running openproject on a virtual server with 2GB of memory. If I check memory usage after a fresh reboot I get:

      # free -m
                    total        used        free      shared  buff/cache   available
      Mem:           2048        1193         389         394         465         594
      Swap:          1024           0        1024
      

      However, I don't think that OOM killed the process as Im not getting anything with grep -i 'killed process' /var/log/syslog. Also, I can not enlarge my swap file because I am not superuser... Further, I am unsure how to set --max-old-space-size

      I realized that I also got the error sh: 1: ng: not found, so after googling and doing npm link, I'm now getting a different error:

      Could not find module "@angular-devkit/build-angular" from "/opt/openproject/frontend".
      Error: Could not find module "@angular-devkit/build-angular" from "/opt/openproject/frontend".
      

      And with some more tinkering, I realized that the /frontend/node_modules folder was empty... So I ran npm install within /frontend/ but Im again stuck with some silly error:

      ERROR in src/app/modules/hal/helpers/hal-resource-builder.ts(139,26): error TS7017: Element implicitly has an 'any' type because type '{}' has no index signature.
      src/app/modules/hal/helpers/hal-resource-builder.ts(165,46): error TS2345: Argument of type 'object' is not assignable to parameter of type 'HalResource'.
        Type '{}' is missing the following properties from type 'HalResource': _type, $halType, states, I18n, and 24 more.
      src/app/modules/plugins/linked/openproject-avatars/module/main.ts(30,27): error TS2307: Cannot find module '../../hook-service'.
      src/app/modules/plugins/linked/openproject-avatars/module/module/main.ts(30,27): error TS2307: Cannot find module '../../hook-service'.
      

      Hope anyone can make some sense out of this mess :(
      Roman

      Hi Roman,

      Thanks for the additional debug output, it is now clear it is not being killed but rather the npm subcommand failed which also triggers a ELIFCECYLCE error. I assume you are on a manual installation? Please ensure you have the frontend dependencies installed with cd <Your OpenProject root> && npm install

      Best,

      Oliver

      Hi all

      Yes the frondend dependencies were installed...

      Regardless, I have now reverted back to an old installation of Openproject (8.2.1) which still supports MySQL databases. For anyone experiencing the same issue, this is what I've done:

    • Hope that you've made a recent SQL dump PRIOR to updating to 8.3.0. Make absolutely sure that you have an SQL dump from an old version!!
    • Uninstall everything related to Openproject according to https://community.openproject.com/topics/10140
    • Make a new database
    • Re-import the SQL dump that ran on a previous openproject version mysql -u openproject -p openproject < openproject_v7.sql
    • Download version 8.2.1 from here: https://packager.io/gh/opf/openproject-ce
    • add it dpkg -i openproject_8.2.1-1550429392.328d0cc4.xenial_amd64.deb
    • Install openproject openproject configure
    • Install bundler gem install bundler:1.17.3
    • And its working again...
    • I find it frankly quite crappy that the new version (8.3.0) does not really support the old mysql databases anymore. At no point have we been informed that upgrading will make Openproject defunct. And no, migration to PostgreSQL did NOT work (at least not for wikis and work packages).

  •