Open
Description
openedon Jul 5, 2022
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 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Type
Projects
Status
Low priority