0
使用NPM 5,運行NPM測試:npm5缺失構建腳本
"scripts": {
"build": "babel src -d dist",
"test": "npm run build; mocha --require 'babel-polyfill' --compilers js:babel-register './tests/**/*.spec.js'"
},
我得到這個錯誤:
npm ERR! missing script: build;
使用NPM 2沒有任何問題
如果我更換NPM運行構建; => babel src -d dist,我得到這個錯誤:
mocha doesn't exist. './tests/**/*.spec.js' doesn't exist
但是摩卡已安裝並測試文件夾exixts。
你準確地運行了什麼命令? –
我正在運行npm test – Alvin
運行npm run build成功了。 – Alvin