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
Create a .npmrc file that has an error, such as referencing a inexistent env variable:
hoist=false
public-hoist-pattern[]=react
//npm.pkg.github.com/:_authToken=${FOO_BAR}# Make sure FOO_BAR *isn't* in your env vars
then run pnpm install
Expected behavior:
An error to indicate to the user that their config file could not be read
Actual behavior:
The node_modules/.modules.yaml entry for publicHoistPattern does not contain react, and that package you wanted to be hoisted, isn't. There is no indication of why this is since the error is swallowed, so it becomes a very nasty bug to track down!
It may well be user error that the env var interpolation didn't work, but for all intents and purposes it seemed like pnpm was successfully proceeding, we only noticed due to the hoisting failing.
Additional information:
PR proposal to fix, or at least ameliorate the problem, here: pnpm/npm-conf#6
node -v prints: v16.15.1
Windows, macOS, or Linux?: Linux
The text was updated successfully, but these errors were encountered:
Hmm there's apparently still some issues with reading .npmrc and generating publicHoistPattern: correctly. I haven't figured out exactly why but when pnpm install is run via expo-build it fails to do public hoisting but it works fine when I jsut run pnpm install in my shell!
Hmm it seems that for whatever reason I cannot have more than one public-hoist-pattern[]= entry or it gets mangled during the expo build into a single string like above and nothing gets hoisted. Not sure how to track this down.
pnpm version:
7.5.2
Code to reproduce the issue:
Create a .npmrc file that has an error, such as referencing a inexistent env variable:
then run
pnpm install
Expected behavior:
An error to indicate to the user that their config file could not be read
Actual behavior:
The
node_modules/.modules.yaml
entry forpublicHoistPattern
does not containreact
, and that package you wanted to be hoisted, isn't. There is no indication of why this is since the error is swallowed, so it becomes a very nasty bug to track down!It may well be user error that the env var interpolation didn't work, but for all intents and purposes it seemed like pnpm was successfully proceeding, we only noticed due to the hoisting failing.
Additional information:
PR proposal to fix, or at least ameliorate the problem, here: pnpm/npm-conf#6
node -v
prints: v16.15.1The text was updated successfully, but these errors were encountered: