'DOPPLER_TOKEN' is not recognized as an internal or external command

Hello, could someone help me? I am trying to install my project on Windows, but I am getting the following error:

PS C:\workspace\lockebio-backend> npm run dev

lockebio-backend@1.0.0 dev

DOPPLER_TOKEN=$npm_package_config_DOPPLER_LOCAL_TOKEN nodemon
‘DOPPLER_TOKEN’ is not recognized as an internal or external command,
operable program or batch file.

This is my packge.json: Sorry for the lack of organization in the json, as I am not allowed to put images here on the forum

“config”: {
“DOPPLER_LOCAL_TOKEN”: >“dp.st.local.[redacted]”
},
“scripts”: {
“prebuild”: “npm run lint”,
“build”: “rimraf ./dist && tsc && resolve-tspaths && cp -R ./src/docs/ ./dist/docs/”,
“dev”: “DOPPLER_TOKEN=$npm_package_config_DOPPLER_LOCAL_TOKEN nodemon”,
“start”: “doppler run -c ${APP_ENV} --fallback=doppler.encrypted.json – node ./dist/app.js”,
“lint”: “eslint ./src/”,
“typecheck”: “tsc-files --noEmit”,
“lint:fix”: “eslint ./src/ --fix”,
“format:fix”: “prettier --write ./src/”,
“precompile”: “npm run lint”,
“compile”: “tsc --watch --noEmit”,
“debug”: “APP_ENV=local doppler run -c local – ts-node -r tsconfig-paths/register ./src/app.ts”,
“migrate:push”: “doppler run -c ${APP_ENV} --fallback=doppler.encrypted.json – npx prisma db push”,
“migrate:dev:apply”: “DOPPLER_TOKEN=$npm_package_config_DOPPLER_LOCAL_TOKEN doppler run -c local – npx prisma migrate dev”,
“migrate:dev:create”: “npm run migrate:dev:down && DOPPLER_TOKEN=$npm_package_config_DOPPLER_LOCAL_TOKEN doppler run -c local – npx prisma migrate dev – name= && npm run migrate:dev:down:after”,
“migrate:dev:create:only”: “npm run migrate:dev:down && DOPPLER_TOKEN=$npm_package_config_DOPPLER_LOCAL_TOKEN doppler run -c local – npx prisma migrate dev --create-only – name= && npm run migrate:dev:down:after”,
“migrate:dev:down”: “DOPPLER_TOKEN=$npm_package_config_DOPPLER_LOCAL_TOKEN doppler run -c local – npx prisma migrate diff --from-schema-datamodel prisma/schema.prisma --to-schema-datasource prisma/schema.prisma --script > prisma/migrations/down.sql”,
“migrate:dev:down:after”: “node ./prisma/migration_down.js”,
“migrate:dev:reset”: “DOPPLER_TOKEN=$npm_package_config_DOPPLER_LOCAL_TOKEN doppler run -c local – npx prisma migrate reset”,
“migrate:deploy”: “doppler run -c ${APP_ENV} --fallback=doppler.encrypted.json – npx prisma migrate deploy”,
“migrate:seed”: “doppler run -c ${APP_ENV} --fallback=doppler.encrypted.json – npx prisma db seed”,
“generate”: “npx prisma generate”,
“prepare”: “npx husky install”
},

It is not recognizing the DOPPLER_TOKEN command, has anyone experienced this? Remembering that it works normally on Mac

Mod Edit: redacted service token

Hi @Ronald_Junger!

Welcome to the Doppler Community!

I think the issue here is that it looks like you’re using PowerShell. I believe you have to set environment variables in PowerShell like this:

$env:DOPPLER_TOKEN = 'your-token-here'; nodemon

Generally speaking, we highly recommend installing and using Windows Subsystem for Linux (WSL) since you’ll generally have a much better time trying to get your stuff to work properly that way!

I’d say give the first syntax a try and if you keep having trouble, try swapping to WSL and see if that helps!

Regards,
-Joel