Open maple3142 opened 7 years ago
I was able to work around this issue by defining the NPM_CONFIG_PREFIX
environment variable and pointing it at my node installation dir.
For example, if you installed to C:\nodejs: setx NPM_CONFIG_PREFIX C:\nodejs
If you're using nvm for windows this works: setx NPM_CONFIG_PREFIX %NVM_SYMLINK%
Not sure what the root cause is but in this case the amphtml-validator package has a post install script for windows that is supposed to update a global installation if there is one. It uses the NPM_CONFIG_PREFIX var to check if it exists. Seems like windows 10 barfs if the env var isn't there.
@pbakaus ⬆️
paging @Gregable, who might know more.
Do you want to request a feature or report a bug? bug
What is the current behavior? run
yarn add amphtml-validator
on win10 then cause an error error log:npm install --save amphtml-validator
works on bothwin10
andbash on windows
yarn add amphtml-validator
only works onbash on windows
What is the expected behavior? install correctly
Please mention your node.js, yarn and operating system version.