ng2-test-seed不能统计 - 没有这样的文件或目录

时间:2016-08-12 19:26:58

标签: node.js angular npm

我正在尝试遵循angular2种子项目但我没有走得太远。

https://github.com/juliemr/ng2-test-seed

执行

npm run build 

导致此错误

cp: cannot stat ‘src/{index.html,styles.css,system-config.js}’: No such file or directory

我已将nodejs更新为v6.3.1 我的npm到3.10.3

我错过了一些明显的东西吗?

1 个答案:

答案 0 :(得分:0)

我的npm和nodejs版本的问题似乎是json包中的卷曲括号复制命令。

这是原始软件包json

中的脚本部分
"scripts": {
    "postinstall": "typings install --ambient",
    "clean": "rimraf built/",
    "copy": "cp src/{index.html,styles.css,system-config.js} built/",
    "copytemplates": "cp src/app/{*.html,*.css} built/app/",
    "build": "tsc && npm run copy && npm run copytemplates",
    "watch": "tsc --watch",
    "serve": "http-server -p 9090 -c-1",
    "test": "karma start karma.conf.js"
}

这是我的版本,我用单独的复制命令替换了“一次复制多个文件”的方法。构建现在正在运行。

"scripts": {
    "postinstall": "typings install --ambient",
    "clean": "rimraf built/",
    "copy": "npm run copyIndex && npm run copyStyles && npm run copySystemConfig",
    "copyIndex": "cp src/index.html built/",
    "copySystemConfig": "cp src/system-config.js built/",
    "copyStyles": "cp src/styles.css built/",
    "copytemplates": "npm run copytemplatesHtml && npm run    copytemplatesCSS",
    "copytemplatesHtml": "cp src/app/*.html built/app/",
    "copytemplatesCSS": "cp src/app/*.css built/app/ ",
    "build": "tsc && npm run copy && npm run copytemplates",
    "watch": "tsc --watch",
    "serve": "http-server -p 9090 -c-1",
    "test": "karma start karma.conf.js"
},

这肯定不可能,但它似乎对我有用。

相关问题