缺少脚本:运行mvn clean install时清理

时间:2017-11-22 06:07:12

标签: node.js maven npm protractor

缺少脚本:在项目工作区中使用命令提示符运行mvn clean install时清理。 正在下载软件包并且还创建了node_Module文件夹。 Pom.xml中还添加了必需的依赖项

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-
cli.js',
1 verbose cli   'run',
1 verbose cli   'clean' ]
2 info using npm@3.10.10
3 info using node@v6.11.3
4 verbose stack Error: missing script: clean
4 verbose stack     at run (C:\Program 
Files\nodejs\node_modules\npm\lib\run-script.js:151:19)
4 verbose stack     at C:\Program Files\nodejs\node_modules\npm\lib\run-
script.js:61:5
4 verbose stack     at C:\Program 
Files\nodejs\node_modules\npm\node_modules\read-package-json\read-
json.js:356:5
4 verbose stack     at checkBinReferences_ (C:\Program 
Files\nodejs\node_modules\npm\node_modules\read-package-json\read-
json.js:320:45)
4 verbose stack     at final (C:\Program 
Files\nodejs\node_modules\npm\node_modules\read-package-json\read-
json.js:354:3)
4 verbose stack     at then (C:\Program 
Files\nodejs\node_modules\npm\node_modules\read-package-json\read-
json.js:124:5)
4 verbose stack     at ReadFileContext.<anonymous> (C:\Program 
Files\nodejs\node_modules\npm\node_modules\read-package-json\read-
json.js:295:20)
4 verbose stack     at ReadFileContext.callback (C:\Program 
Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16)
4 verbose stack     at FSReqWrap.readFileAfterOpen [as oncomplete] 
(fs.js:367:13)
5 verbose cwd C:\Users\a655086\Documents\My Received Files\Alisha
6 error Windows_NT 6.1.7601
7 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program 
Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "clean"
8 error node v6.11.3
9 error npm  v3.10.10
10 error missing script: clean
11 error If you need help, you may report this error at:
11 error     <https://github.com/npm/npm/issues>
12 verbose exit [ 1, true ]

从评论中插入:

从Pom.xml添加了干净的代码

<!-- Required: The following will ensure npm install is called before anything else during the 'Clean Lifecycle' -->
<execution>
    <id>npm install (clean)</id>
    <goals>
        <goal>exec</goal>
    </goals>
    <phase>pre-clean</phase>
    <configuration>
        <executable>npm</executable>
        <arguments>
            <argument>install</argument>
         </arguments>
    </configuration>
</execution>

0 个答案:

没有答案