我正在为我的 Spring boot + Angular 4 项目自动配置 CodeBuild,在该项目中我使用 maven-frontend-plugin 安装 node 和 npm。由于它在本地安装它们,因此我的 ng 构建会引发如下错误。有什么帮助吗?
[INFO] > ng build --prod --no-aot --base-href --allow-root
[ERROR] sh: 1: ng: Permission denied
这是我的 pom 部分
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<configuration>
<workingDirectory>${project.basedir}/src/main/resources/ui/</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v9.0.0</nodeVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install -g</arguments>
</configuration>
</execution>
<execution>
<id>prod</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run-script prod</arguments>
</configuration>
<phase>generate-resources</phase>
</execution>
</executions>
</plugin>