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.2k stars 867 forks source link

The specified option ("--registry") is invalid. #1105

Open danshome opened 9 months ago

danshome commented 9 months ago

Is there some way to stop the frontend-maven-plugin from always passing --registry as a parameter? I'm using yarn and trying to run the build script, but it keeps passing in --registry as a parameter to the script, not yarn. This results in a failure to run the script because "The specified option ("--registry") is invalid."

        <execution>
          <id>yarn run build</id>
          <goals>
            <goal>yarn</goal>
          </goals>
          <configuration>
            <arguments>run build</arguments>
          </configuration>
        </execution>
danshome commented 9 months ago

The only workaround I've found is to initialize both install-node-and-npm and install-node-and-yarn, then use "npm run-script build" instead of "yarn run build".

eirslett commented 9 months ago

Try to disable inheritsProxyFromMaven or something like that - if you dive into the source code, you will find it. I'm sure there's a way!

123Haynes commented 8 months ago

https://github.com/eirslett/frontend-maven-plugin/pull/1120 should fix this issue as well I think.