You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll just piggy back on this issue since I'm also having issues with environment variables in the .npmrc file. My monorepo structure currently is like this
packages/
front-end/
back-end/
In front-end and back-end i have .npmrc files that have these lines:
If my current working directory is either back-end or front-end and I do pnpm install everything works as expected (The environment variables get read).
But if my current working directory is packages and i do pnpm recursive install or pnpm install -r then the environment variables are not read.
Instead if creates the directories /$\{USER_DIR\}/.pnpm-cache/\$\{REPO\}/back-end and /$\{USER_DIR\}/.pnpm-cache/\$\{REPO\}/front-end.
So pnpm is reading the npmrc files but it didn't substitute the variables.
I'm fine doing pnpm install individually in each package but i read a comment from @zkochan somewhere that said that doing pnpm install -r will do things in parallel for all the packages if they point to the same store.
Coming back to this issue since it is still present but at least it is easier to see thanks to the changes in the most recent versions of pnpm.
As you can see from the screenshot, the env vars were not replaced. The -r flag is so tempting to use because it just makes sense to use it to add a package to all the repos at once instead of having to cd to each and execute the command.
JensDallmann
added a commit
to CoreMedia/ckeditor-plugins
that referenced
this issue
Sep 10, 2021
I'll just piggy back on this issue since I'm also having issues with environment variables in the
.npmrc
file. My monorepo structure currently is like thisIn front-end and back-end i have .npmrc files that have these lines:
If my current working directory is either back-end or front-end and I do
pnpm install
everything works as expected (The environment variables get read).But if my current working directory is
packages
and i dopnpm recursive install
orpnpm install -r
then the environment variables are not read.Instead if creates the directories
/$\{USER_DIR\}/.pnpm-cache/\$\{REPO\}/back-end
and/$\{USER_DIR\}/.pnpm-cache/\$\{REPO\}/front-end
.So pnpm is reading the npmrc files but it didn't substitute the variables.
I'm fine doing
pnpm install
individually in each package but i read a comment from @zkochan somewhere that said that doingpnpm install -r
will do things in parallel for all the packages if they point to the same store.Originally posted by @jmlopez-rod in #2569 (comment)
The text was updated successfully, but these errors were encountered: