I am trying to add a new new config setting to a teams tab created with the teams toolkit. I'm following the instructions at :
https://arjunumenon.com/auto-provision-variable-values-teams-toolkit/
I have gone through all the steps there. I can see that the .localConfigs file DOES have my new variables set. (both the .localConfigs file in the api folder AND the one in the root folder).
But in my config.ts the provess.env object does not contain the values that I set in my .env files. Note that i added my new variables to ALL of the .env files but they are still not appearing in process.env.
In the scripts section of package.json I have this "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start" so i believe it should be pickking up those environment variables.
Any ideas why they would not be appearing?
Full package.json follows:
{
"name": "teamsfileexplorernative",
"version": "0.1.0",
"engines": {
"node": "16 || 18"
},
"private": true,
"dependencies": {
"@fluentui/react": "8.115.6",
"@fluentui/react-icons-mdl2": "1.3.59",
"@microsoft/mgt-react": "4.1.0",
"@microsoft/mgt-teamsfx-provider": "4.1.0",
"@microsoft/teams-js": "^2.13.0",
"@microsoft/teamsfx": "^2.2.0",
"@microsoft/teamsfx-react": "^3.0.0",
"axios": "^0.21.1",
"loadash": "^1.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.8.0",
"react-scripts": "^5.0.1"
},
"devDependencies": {
"@types/node": "^14.0.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react-router-dom": "^5.3.3",
"env-cmd": "^10.1.0",
"typescript": "^4.1.2"
},
"scripts": {
"dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "echo \"Error: no test specified\" && exit 1",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"homepage": "."
}