Installation failure on npm run build

I am attempting to install OJS 3.2 using Git (master branch). Following all the instructions, I have got to the last steps, but am failing at npm stage:

$ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN cypress-file-upload@3.5.3 requires a peer of cypress@^3.0.0 but none was installed.
npm WARN eslint-config-standard@14.1.1 requires a peer of eslint@>=6.2.2 but none was installed.
[bweigel@beln-ojs2 html]$ npm run build

> OJS3@3.2.0 build /var/www/html
> vue-cli-service build --no-clean

/var/www/html/node_modules/open/index.js:16
const wslToWindowsPath = async path => {
                               ^^^^

SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/var/www/html/node_modules/@vue/cli-shared-utils/lib/openBrowser.js:9:14)

npm ERR! Linux 3.10.0-1062.1.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
npm ERR! node v6.17.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! OJS3@3.2.0 build: `vue-cli-service build --no-clean`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the OJS3@3.2.0 build script 'vue-cli-service build --no-clean'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the OJS3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     vue-cli-service build --no-clean
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs OJS3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls OJS3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/html/npm-debug.log

Error log looks like this:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm@3.10.10
3 info using node@v6.17.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle OJS3@3.2.0~prebuild: OJS3@3.2.0
6 silly lifecycle OJS3@3.2.0~prebuild: no script for prebuild, continuing
7 info lifecycle OJS3@3.2.0~build: OJS3@3.2.0
8 verbose lifecycle OJS3@3.2.0~build: unsafe-perm in lifecycle true
9 verbose lifecycle OJS3@3.2.0~build: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/var/www/html/node_modules/.bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/bweigel/.local/bin:/home/bwe$
10 verbose lifecycle OJS3@3.2.0~build: CWD: /var/www/html
11 silly lifecycle OJS3@3.2.0~build: Args: [ '-c', 'vue-cli-service build --no-clean' ]
12 silly lifecycle OJS3@3.2.0~build: Returned: code: 1  signal: null
13 info lifecycle OJS3@3.2.0~build: Failed to exec build script
14 verbose stack Error: OJS3@3.2.0 build: `vue-cli-service build --no-clean`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:920:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
15 verbose pkgid OJS3@3.2.0
16 verbose cwd /var/www/html
17 error Linux 3.10.0-1062.1.2.el7.x86_64
18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
19 error node v6.17.1
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error OJS3@3.2.0 build: `vue-cli-service build --no-clean`
22 error Exit status 1
23 error Failed at the OJS3@3.2.0 build script 'vue-cli-service build --no-clean'.
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 OJS3 package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     vue-cli-service build --no-clean
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs OJS3
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls OJS3
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

I have installed Cypress and eslint, but am having trouble with them – they don’t seem to be recognized? Any help sorting this out would be appreciated.

Hi @brandonw_eln,

I suspect you’re using a node/npm toolset that’s older than expected. You might compare your process against the integration test log for a recent build: https://travis-ci.org/github/pkp/ojs

Regards,
Alec Smecher
Public Knowledge Project Team

Amazing, I don’t know why older versions of node.js and npm would have been installed, but that was indeed the case. Thanks. I’m now on Node 14 and NPM 6.

npm run build ran successfully, but with warnings:

 warning  

asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  build.js (1.11 MiB)

 warning  

entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (1.18 MiB)
      ../styles/build.css
      build.js


 warning  

webpack performance recommendations: 
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

  File                Size                        Gzipped

  js/build.js         1134.57 KiB                 328.27 KiB
  styles/build.css    72.05 KiB                   12.08 KiB

Is this anything to worry about?

Hi @brandonw_eln,

No, that looks fine – the webpack asset set is only loaded in the administrative back end, where asset sizes aren’t such a big concern.

Regards,
Alec Smecher
Public Knowledge Project Team

So from that point, should OJS be working? Is there an install page I should be pointing at? The docs are kind of sparse at this point.

Hi @brandonw_eln,

See docs/README.md for the conventional installation instructions.

Regards,
Alec Smecher
Public Knowledge Project Team