这可以在Powershell命令行上使用:
C:\rootProject\> copy ZZZ.js -destination ZZZXXX.js但这不管用:
package.json
"scripts": {
"copy-script": "copy ZZZ.js -destination ZZZXXX.js"
}运行脚本:
C:\rootProject\> npm run copy-script误差
The syntax of the command is incorrect.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-module-imports@1.0.0 test-copy: `copy ZZZ.js -destination ZZZXXX.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-module-imports@1.0.0 test-copy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER\AppData\Roaming\npm-cache\_logs\2019-11-29T09_29_59_261Z-debug.log发布于 2019-11-29 09:40:02
它需要在脚本中的命令之前使用powershell术语。
package.json
"scripts": {
"copy-script": "powershell copy ZZZ.js -destination ZZZXXX.js"
}现在它起作用了:
C:\rootProject\> npm run copy-scripthttps://stackoverflow.com/questions/59102275
复制相似问题