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

[rush] Using install throw "??=" error #4580

Closed
jackerjay opened this issue Mar 15, 2024 · 6 comments
Closed

[rush] Using install throw "??=" error #4580

jackerjay opened this issue Mar 15, 2024 · 6 comments

Comments

@jackerjay
Copy link

Summary

Expected: Install all dependencies successfully
Action: Just use rush install for install all dependencies
Wrong: We got Internal Error: Error loading rush plugin

Repro steps

Expected result: Install all dependencies successfully

Actual result: ERROR: Internal Error: Error loading rush plugin from .. node_modules/@rushstack/rush-azure-storage-build-cache-plugin/lib/index.js": SyntaxError: Unexpected token '??='

Details

The configuration of our repo has not changed at all, the current error started to appear on the afternoon of March 14th.
We find out a same issue #28918 in Azure/azure-sdk-for-js

Even though @rushstack/rush-azure-storage-build-cache-plugin is actually careful enough to only require patch updates from @azure/identity:

"dependencies": {
    "@azure/identity": "~2.1.0",
    ...
  }

But @azure/identity here is more permissive:
https://github.com/Azure/azure-sdk-for-js/blob/8ec4dab324f203aabca744fb07d9be2e3ca27e58/sdk/identity/identity/package.json#L112

"dependencies": {
    "@azure/core-rest-pipeline": "^1.1.0"
   ...
}

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.93.2
rushVersion from rush.json? 5.93.0
useWorkspaces from rush.json? Yes
Operating system? Mac & Linux
Would you consider contributing a PR? No
Node.js version (node -v)? 14.21.3
@SarbajeetRoyTR
Copy link

We are also encountering this issue while publishing artifacts.

@diegoLeonTamayo
Copy link

We are also facing this issue. However, the problem occurs only when we run the command rush change -b origin/main -v

@eduarevalo
Copy link

@jackerjay @SarbajeetRoyTR The problem seems to impact node 14. I upgraded my setup to node 18 and all is back functional again!

@jackerjay
Copy link
Author

@jackerjay @SarbajeetRoyTR The problem seems to impact node 14. I upgraded my setup to node 18 and all is back functional again!

Yes, upgrading the Node version is a solution (just upgrade to Node V16 will be OK) . However, this issue is caused by a dependency in rush-lib, and the situation we are facing is due to project issues, our Node version cannot be upgraded smoothly. So upgrading the Node version is not quite suitable for our project.

@JerrysShan
Copy link

We have encountered the same issue. Is there any estimated time for fixing it?

@iclanton
Copy link
Member

Node 14 is no longer in support, so fixing this is out of scope for Rush. Node 14 went EOL a little less than a year ago (see https://github.com/nodejs/release?tab=readme-ov-file#end-of-life-releases).

If you do need to support Node 14, and as this issue is in the @azure/core-rest-pipeline, I'd recommend opening an issue there and asking that team to publish an update to their package. You can also consider checking in a lockfile for the install-run-rush.js script and setting the INSTALL_RUN_RUSH_LOCKFILE_PATH env when this script is invoked in CI.

I'd strongly recommend upgrading Node in your repo, as EOL versions of Node no longer get security updates.

The only potentially simple way to handle this for Rush would be to wrap the built-in cache plugin initializations in try-catch blocks and print a warning if one fails to load or initialize. We would probably take that fix, but we don't have any plans to implement it ourselves at this point. For that, consider opening a new issue. Keep in mind if you're using that plugin's functionality, in this case Azure Stroage build cache, that functionality won't work.

@iclanton iclanton closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

6 participants