Dspace 7.5 Installation Invalid or unexpected token

126 views
Skip to first unread message

rizky subagja

unread,
Jan 14, 2024, 11:13:54 PM1/14/24
to DSpace Technical Support
I am trying to install 7.5 on ubuntu 20.04.
My yarn version is 1.22.21
my node version is 16.20.0

the yarn isntall was successful without problem, but when i want to try to run "yarn run build:prod" it said this:

/build/dspace-angular-dspace-7.5# yarn build:prod
yarn run v1.22.21
$ yarn run build:ssr
SyntaxError: Invalid or unexpected token
    at /root/.nvm/versions/node/v16.20.0/lib/node_modules/yarn/lib/cli.js:41718:4
    at Object.<anonymous> (/root/.nvm/versions/node/v16.20.0/lib/node_modules/yarn/lib/cli.js:41816:2)
    at __webpack_require__ (/root/.nvm/versions/node/v16.20.0/lib/node_modules/yarn/lib/cli.js:22:30)
    at _load_config (/root/.nvm/versions/node/v16.20.0/lib/node_modules/yarn/lib/cli.js:88866:43)
    at /root/.nvm/versions/node/v16.20.0/lib/node_modules/yarn/lib/cli.js:88358:34
    at Generator.next (<anonymous>)
    at step (/root/.nvm/versions/node/v16.20.0/lib/node_modules/yarn/lib/cli.js:310:30)
    at /root/.nvm/versions/node/v16.20.0/lib/node_modules/yarn/lib/cli.js:328:14
    at new Promise (<anonymous>)
    at new F (/root/.nvm/versions/node/v16.20.0/lib/node_modules/yarn/lib/cli.js:5540:28)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

please help me, how to resolve this.
Thank you, Best Regards
-Kyky

DSpace Technical Support

unread,
Jan 16, 2024, 12:55:34 PM1/16/24
to DSpace Technical Support
Hi Kyky,

That's definitely an odd error.   Maybe you had previously built an older version of DSpace and it's encountering some older versions of dependencies?

If so, you can run "yarn clean", then "yarn install" and "yarn build:prod" again.

If that still doesn't work, you might try reinstalling Yarn or Node.  This error almost sounds like Yarn itself is having a failure.  Maybe it didn't get installed properly?

Tim

rizky subagja

unread,
Jan 31, 2024, 1:59:16 AM1/31/24
to DSpace Technical Support
Hi,

Thank you for the suggestion I've tried it.
I am re-install the yarn and also node but it still didn't fix the problem and I just notice, every time i tried to "yarn run build:prod" the error always different. But it still said invalid token, But the error line/file is always different every time.

Hopefully you have another suggestion for this

Kyky
Reply all
Reply to author
Forward
0 new messages