eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.21k stars 867 forks source link

[Question] How to using npm proxy config from .npmrc #1020

Open hoangdt9 opened 2 years ago

hoangdt9 commented 2 years ago

Hello guys,

I'm working on Maven and npm with different proxy for both. I would like to disable Maven proxy and using npm proxy from (.npmrc). I tried setup in pom.xml followed as https://github.com/eirslett/frontend-maven-plugin#proxy-settings but when download npm it's always refer Maven proxy ([INFO] Downloading via proxy http{protocol='http', host='70.10.15.10', port=8080, nonProxyHosts='localhost|70.*|nexus.sdsdev.co.kr'}).

Thank you!

zymzxq commented 2 years ago

Another way to set a registry is to add a .npmrc file in your project's root directory https://github.com/eirslett/frontend-maven-plugin#readme It doesn't respect the one in your home directory, you need to copy it to your project