我覺得我在這裏做的事情真的很愚蠢,但我沒有第二套方便的眼睛。`SyntaxError:意外的令牌...`當試圖'需要'
describe('app.backend.src.server',() => {
const proxyquire = require('proxyquire');
const mach = require('mach.js'); // <- this is giving the error
it('should pass to make sure Im not crazy',() => {
expect(true).toBe(true);
});
});
我得到以下錯誤:
Failures:
1) app.backend.src.server encountered a declaration exception
1.1) SyntaxError: Unexpected token ...
的package.json
...
"devDependencies": {
"gulp": "^3.9.1",
"gulp-istanbul": "^1.1.1",
"gulp-jasmine": "^2.4.2",
"gulp-jshint": "^2.0.4",
"gulp-tap": "^0.1.3",
"jshint": "^2.9.4",
"mach.js": "^0.5.0",
"proxyquire": "^1.7.11",
"run-sequence": "^1.2.2"
}
...
有什麼建議?
什麼是確切的錯誤? – Carcigenicate
@Carcigenicate,錯誤更新。 –
你使用什麼版本的節點?這看起來像傳播運算符:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator –