installing node and npm execution does not respect .npmrc registry setting
See original GitHub issueI have tried using .npmrc to set the npm registry, but is ignored by the install node and npm execution. However, If I change the nodeVersion and npmVersion in that step to to provided (to prevent the attempted npm/node downloads), the setting in .npmrc is respected by the subsequent npm install execution. I have seen this same behavior now in completely different projects.
I have tried placing .npmrc is in the parent directory of the pom.xml and also in the same directory as the pom.xml
Configuration is like this:
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.7.6</version>
<configuration>
<nodeVersion>v10.13.0</nodeVersion>
<npmVersion>6.9.0</npmVersion>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
</executions>
</plugin>
Watching the build, I can see it attempting to download (for example) npm from:
https://registry.npmjs.org/npm/-/npm-6.9.0.tgz
Instead of our internal mirror as defined in .npmrc.
Any suggestions?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Is there a way to make npm install (the command) to work ...
I solved this problem this way: I run this command: npm config set strict-ssl false. Then set npm to run with http, instead...
Read more >Configure Your NPM Registry Settings - Nono Martínez Alonso
Run the npm config list command to see what variables are set. If you run this in a project folder with an .npmrc...
Read more >npm packages in the Package Registry - GitLab Docs
Ensure that your package scope is set consistently in your package.json and .npmrc files. For example, if your project name in GitLab is...
Read more >Workspaces - npm Docs
Workspaces is a generic term that refers to the set of features in the npm cli that provides support to managing multiple packages...
Read more >npm-install - npm Docs
With the --production flag (or when the NODE_ENV environment variable is set to production ), npm will not install modules listed in devDependencies...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am embarrassed. It turns out that I needed to add the correct value in the <npmDownloadRoot> tag. All is well now.
Why do you have
<configuration>
inside<configuration>
?