Closed cstmgl closed 2 years ago
When it comes to npm install
the task you want to configure is pre-configured npmInstall
which unfortunately isn't the same as the auto-generated npm_install
that comes from the npm_foo
task rule.
(really sorry about the confusion here, it's a legacy thing and so far we don't have any easy to break the backwards compatibility for it but it's recommended to not use the rules)
Not sure where the --dev
is coming from though, it doesn't exist in our codebase as far as I can tell
Because of the issue Running with sudo or as root from node-sass, we apply --unsafe-perm
as following
import com.github.gradle.node.npm.task.NpmInstallTask
…
tasks.named<NpmInstallTask>("npmInstall").configure {
args.add("--unsafe-perm")
}
or
npmInstall {
args = ['--unsafe-perm']
}
HTH
When it comes to
npm install
the task you want to configure is pre-configurednpmInstall
which unfortunately isn't the same as the auto-generatednpm_install
that comes from thenpm_foo
task rule. (really sorry about the confusion here, it's a legacy thing and so far we don't have any easy to break the backwards compatibility for it but it's recommended to not use the rules)Not sure where the
--dev
is coming from though, it doesn't exist in our codebase as far as I can tell
I also download the source of the plugin and did not find any --dev so it for sure must be something on my side. Also the error only happens in jenkins not locally so most likely it's not a problem with the plugin. I will close this ticket. thank you for the feedback
Hi all,
First I'm really not an expert in this plugin and npm itself but I have some questions.
I'm trying to get rid of a warning I get when installing my package.json but I'm failing to do so.
I get:
I tried to fix it like in the documentation with something like this.
so I tried both:
or
But neither work so I'm just curious what I might be doing wrong. Or is the problem in my package.json and not a configuration of the plugin? my package json looks like this: