Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during postinstall script execution using yarn v3 #431

Open
benjaminchardin2 opened this issue Sep 21, 2021 · 2 comments
Open

Error during postinstall script execution using yarn v3 #431

benjaminchardin2 opened this issue Sep 21, 2021 · 2 comments

Comments

@benjaminchardin2
Copy link

Are you submitting a bug report or a feature request?

Bug Report

What is the current behavior?

When executing the postinstall script using yarn berry (v2) or v3, the following error occurs:

# This file contains the result of Yarn building a package (final-form@npm:4.18.2)
# Script name: postinstall

[eval]:1
console.log('Using final-form at work? You can now donate to our open collective:
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Invalid or unexpected token
    at new Script (vm.js:100:7)
    at createScript (vm.js:261:10)
    at Object.runInThisContext (vm.js:309:10)
    at internal/process/execution.js:77:19
    at [eval]-wrapper:6:22
    at evalScript (internal/process/execution.js:76:60)
    at internal/main/eval_string.js:23:3

What is the expected behavior?

postinstall script should execute without raising an error when using yarn berry or yarn v3

What's your environment?

Final form version : 4.18.2
Yarn version : yarn-3.1.0-rc.5

Other information

This issue seems to have occured in another package

related issue: nolimits4web/swiper#3057
related merge request solving the issue: https://github.com/nolimits4web/swiper/pull/3355/files

@Otard95
Copy link

Otard95 commented Feb 9, 2022

Same here.

$ cat /tmp/xfs-147af4df/build.log
# This file contains the result of Yarn building a package (final-form@npm:4.18.6)
# Script name: postinstall

[eval]:1
console.log('Using final-form at work? You can now donate to our open collective:
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Invalid or unexpected token
    at new Script (node:vm:100:7)
    at createScript (node:vm:257:10)
    at Object.runInThisContext (node:vm:305:10)
    at node:internal/process/execution:75:19
    at [eval]-wrapper:6:22
    at evalScript (node:internal/process/execution:74:60)
    at node:internal/main/eval_string:27:3

$ uname -a
Linux <host> 5.10.0-11-amd64 #1 SMP Debian 5.10.92-1 (2022-01-18) x86_64 GNU/Linux

$ yarn --version
3.1.1

$ node -v
v16.13.2

@gertdreyer
Copy link
Collaborator

@Otard95 @benjaminchardin2 If you were to submit a PR to fix this issue I will review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants