当前正在尝试运行gradlew build,但是在我的计算机上重新安装Windows之后,它不再起作用。任何帮助都会得到应用
我在命令提示符下遇到的错误在下面
任务':www:node'的执行失败。
A problem occurred starting process 'command 'npm''
exec {
workingDir 'src/main/web'
commandLine 'npm', 'install'
}
最佳答案
在同时使用Windows和* nix的项目上时,我遇到了类似的问题。我这样修复了...
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine 'npm.cmd', 'install'
} else {
commandLine 'npm', 'install'
}
对于Windows,您需要使用.cmd
关于windows - 无法在cmd中使用gradle build启动命令 'npm'',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39066781/