문제

I'm trying to setup require like it's set in the index.html document so that there aren't any problems... for some reason vowsjs is complaining about require.config...

maybe it's using an old requirejs version? vows 0.7.0

(ProjectEnv)obitusis@8675309 ~../static/js: sudo vows test_models.js

../static/js/test_models.js:1
(function (exports, require, module, __filename, __dirname) { require.config({
                                                                      ^
TypeError: Object function require(path) {
    return self.require(path);
  } has no method 'config'
    at Object.<anonymous> (../static/j
s/test_models.js:1:71)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at ProjectEnv/lib/node_modules/vows/bin/vow
s:567:19
    at Array.reduce (native)
    at importSuites (ProjectEnv/lib/node_module
s/vows/bin/vows:560:18)
도움이 되었습니까?

해결책

Think I've fixed it... looks like i needed...

var require = require('requirejs')

UPDATE

var requirejs = require('requirejs') // guess their require ain't compatible

Check out: Building node modules with AMD or RequireJS for more information.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top