Calling Chai plugin in Intern returns error
问题 I was trying to use the sinon-chai plugin within Intern but it gave me: Error {stack: (...), message: "Cannot find the Node.js require"} I had installed the plugin via npm and here's my test file: define([ 'intern!bdd', 'intern/chai!expect', 'app/functions', 'intern/chai', 'intern/dojo/node!sinon-chai' ], function (bdd, expect, myapp, chai, sinonChai) { chai.use(sinonChai); ... }); What might go wrong? 回答1: The node loader requires Node.js, so it can't be used in the browser. You'll need to