-
Notifications
You must be signed in to change notification settings - Fork 651
Open
Labels
effort: mediumNeeds a somewhat experienced developerNeeds a somewhat experienced developerhelp wantedIf you're looking to contribute, this issue is a good place to start!If you're looking to contribute, this issue is a good place to start!
Description
Summary
I have a create-react-app project with an environment file (.env) that contains the following line:
REACT_APP_VERSION=$npm_package_version
When running npm run start or pnpm run start, the variable gets populated with the correct version number from the package.json. When running rushx start, this does not work. The environment variable stays empty.
Repro steps
Setup a new Rush installation with a single project inside, only containing a package.json with the following contents:
{
"name": "test",
"version": "1.0.0",
"description": "",
"scripts": {
"test": "echo $npm_package_version"
},
"author": "",
"license": "ISC"
}
Then run the following command in that project:
rushx test
Expected result:
$ npm run test
> echo $npm_package_version
1.0.0
Actual result:
$ rushx test
> "echo $npm_package_version"
Details
Standard questions
Please answer these questions to help us investigate your issue more quickly:
| Question | Answer |
|---|---|
@microsoft/rush globally installed version? |
@microsoft/rush@5.71.0 |
rushVersion from rush.json? |
5.74.0 |
useWorkspaces from rush.json? |
true |
| Operating system? | Mac Apple Silicon |
| Would you consider contributing a PR? | Yes |
Node.js version (node -v)? |
18.1.0 |
TheBitTheBit
Metadata
Metadata
Assignees
Labels
effort: mediumNeeds a somewhat experienced developerNeeds a somewhat experienced developerhelp wantedIf you're looking to contribute, this issue is a good place to start!If you're looking to contribute, this issue is a good place to start!
Type
Projects
Status
Low priority