tools
tools copied to clipboard
🐛 <TITLE> gitlab runner error
Environment information
gitlab runner
What happened?
$ pnpm install
Lockfile is up-to-date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +1972
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1972, reused 0, downloaded 0, added 0
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: /home/www/.pnpm-store/v3
Virtual store is at: node_modules/.pnpm
Progress: resolved 1972, reused 188, downloaded 0, added 188
Progress: resolved 1972, reused 712, downloaded 1, added 702
Progress: resolved 1972, reused 1512, downloaded 1, added 1504
Progress: resolved 1972, reused 1967, downloaded 1, added 1967
Progress: resolved 1972, reused 1971, downloaded 1, added 1972, done
.../node_modules/core-js-pure postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../[email protected]/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../[email protected]/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../[email protected]/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../[email protected]/node_modules/es5-ext postinstall$ node -e "try{require('./_postinstall')}catch(e){}" || exit 0
.../[email protected]/node_modules/core-js postinstall: Done
.../[email protected]/node_modules/core-js postinstall: Done
.../node_modules/core-js-pure postinstall: Done
.../[email protected]/node_modules/esbuild postinstall$ node install.js
.../[email protected]/node_modules/esbuild postinstall$ node install.js
.../[email protected]/node_modules/es5-ext postinstall: Done
.../[email protected]/node_modules/core-js postinstall: Done
.../[email protected]/node_modules/esbuild postinstall: Done
.../[email protected]/node_modules/esbuild postinstall: Done
.../.pnpm/[email protected]/node_modules/rome postinstall$ node scripts/postinstall.js
.../.pnpm/[email protected]/node_modules/rome postinstall: /xxx/node_modules/.pnpm/[email protected]/node_modules/rome/scripts/postinstall.js:18
.../.pnpm/[email protected]/node_modules/rome postinstall: const binName = PLATFORMS?.[platform]?.[arch];
.../.pnpm/[email protected]/node_modules/rome postinstall: ^
.../.pnpm/[email protected]/node_modules/rome postinstall: SyntaxError: Unexpected token '.'
.../.pnpm/[email protected]/node_modules/rome postinstall: at wrapSafe (internal/modules/cjs/loader.js:1054:16)
.../.pnpm/[email protected]/node_modules/rome postinstall: at Module._compile (internal/modules/cjs/loader.js:1102:27)
.../.pnpm/[email protected]/node_modules/rome postinstall: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
.../.pnpm/[email protected]/node_modules/rome postinstall: at Module.load (internal/modules/cjs/loader.js:986:32)
.../.pnpm/[email protected]/node_modules/rome postinstall: at Function.Module._load (internal/modules/cjs/loader.js:879:14)
.../.pnpm/[email protected]/node_modules/rome postinstall: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
.../.pnpm/[email protected]/node_modules/rome postinstall: at internal/main/run_main_module.js:17:47
.../.pnpm/[email protected]/node_modules/rome postinstall: Failed
ELIFECYCLE Command failed with exit code 1.
Expected result
no error
Code of Conduct
- [X] I agree to follow Rome's Code of Conduct
Thanks for reporting this issue.
Do you know what version of node is running inside of your gitlab-runner?
xx version ?
how see?
It seems you may be able to tell by the image your using
What's the value of the image key in your workflow?
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
#
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Nodejs.gitlab-ci.yml
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:latest

Hmm, that's odd. Optional chaining is supported since node 16
How many versions are recommended
How many versions are recommended
Rome supports node version 14 and newer, which is why I'm confused that you're seeing this error. I installed node14 locally to double-check that it works and Rome runs without any problems.
Would it be possible to share your gitlab workflow or more information how the job is set up?
Whether it is related to the platform
👋 @rome/staff please triage this issue by adding one of the following labels: S-Bug: confirmed, S-Planned , S-Wishlist or umbrella
@crazyair could you try again? In 11.0.0 we changed how the postinstall script is installed
$ pnpm install
Lockfile is up-to-date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +1981
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1981, reused 0, downloaded 0, added 0
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: /home/www/.pnpm-store/v3
Virtual store is at: node_modules/.pnpm
Progress: resolved 1981, reused 137, downloaded 1, added 133
Progress: resolved 1981, reused 607, downloaded 3, added 609
Progress: resolved 1981, reused 1332, downloaded 3, added 1334
Progress: resolved 1981, reused 1973, downloaded 3, added 1975
Progress: resolved 1981, reused 1978, downloaded 3, added 1981, done
.../[email protected]/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../node_modules/core-js-pure postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../[email protected]/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../[email protected]/node_modules/es5-ext postinstall$ node -e "try{require('./_postinstall')}catch(e){}" || exit 0
.../[email protected]/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../[email protected]/node_modules/core-js postinstall: Done
.../node_modules/core-js-pure postinstall: Done
.../[email protected]/node_modules/core-js postinstall: Done
.../[email protected]/node_modules/esbuild postinstall$ node install.js
.../[email protected]/node_modules/esbuild postinstall$ node install.js
.../[email protected]/node_modules/core-js postinstall: Done
.../[email protected]/node_modules/es5-ext postinstall: Done
.../[email protected]/node_modules/esbuild postinstall: Done
.../[email protected]/node_modules/esbuild postinstall: Done
.../.pnpm/[email protected]/node_modules/rome postinstall$ node scripts/postinstall.js
.../.pnpm/[email protected]/node_modules/rome postinstall: const binName = PLATFORMS?.[platform]?.[arch];
.../.pnpm/[email protected]/node_modules/rome postinstall: ^
.../.pnpm/[email protected]/node_modules/rome postinstall: SyntaxError: Unexpected token '.'
.../.pnpm/[email protected]/node_modules/rome postinstall: at wrapSafe (internal/modules/cjs/loader.js:1054:16)
.../.pnpm/[email protected]/node_modules/rome postinstall: at Module._compile (internal/modules/cjs/loader.js:1102:27)
.../.pnpm/[email protected]/node_modules/rome postinstall: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
.../.pnpm/[email protected]/node_modules/rome postinstall: at Module.load (internal/modules/cjs/loader.js:986:32)
.../.pnpm/[email protected]/node_modules/rome postinstall: at Function.Module._load (internal/modules/cjs/loader.js:879:14)
.../.pnpm/[email protected]/node_modules/rome postinstall: at internal/main/run_main_module.js:17:47
.../.pnpm/[email protected]/node_modules/rome postinstall: Failed
ELIFECYCLE Command failed with exit code 1.
Most probably the issue is around gitlab and its node version. Unfortunately we can't fix it