MAVEN生成失败,节点权限被拒绝



在本地构建项目时,UI应用程序出现构建失败,这似乎与NPM有关。不确定它是否与Node或JDK的一些Java问题有关。有关于这个问题的信息吗?

是否有一些我必须更改的内部权限配置?

sh: /Users/test.gc/Desktop/git/test-dot-com/test-dot-com/ui.apps/node_modules/.bin/npm-run-all: Permission denied
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 126 (Exit value: 126)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for jll-dot-com 21.5.0:
[INFO] 
[INFO] jll-dot-com ........................................ SUCCESS [  0.246 s]
[INFO] jll-dot-com - Core ................................. SUCCESS [ 15.429 s]
[INFO] jll-dot-com - Groovy Console Extension ............. SUCCESS [  0.933 s]
[INFO] jll-dot-com - UI apps .............................. FAILURE [  8.991 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  26.590 s
[INFO] Finished at: 2021-05-10T08:57:09-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (npm-run-build) on project jll-dot-com.ui.apps: Command execution failed.: Process exited with an error: 126 (Exit value: 126) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :jll-dot-com.ui.apps

要在没有故障的情况下完成此构建,需要采取哪些步骤。

sh: /Users/test.gc/Desktop/git/test-dot-com/test-dot-com/ui.apps/node_modules/.bin/npm-run-all: Permission denied

第一句话说明了一切。

我建议您尝试在代码回购中直接使用npm运行相同的命令,看看您获得了什么样的权限。

npx npm-run-all

每个文件有3个属性:读取、写入和执行

total 0
0 drwx------@  6 samuel  staff   192 Apr 27 17:28 Applications

您可能没有执行该文件的权限。这可能是由许多可能的原因造成的。例如,如果您下载,然后复制并粘贴它们。如果权限问题确实是由权限不足引起的,请使用以下命令更改权限。

chmod +x YOUR_REPO_DIR/.bin/*

这将授予命令执行权限。

最新更新