0

コードが同じで、インストール手順も同じである過去 2 日間からこのエラーが発生しています。これは、jasmine-node の新しい更新が原因です。

            /var/www/jasmine-node# jasmine-node --verbose --junitreport --noColor spec

            /usr/local/lib/node_modules/jasmine-node/lib/jasmine-node/reporter.js:336
              jasmineNode.TeamcityReporter.prototype = new jasmine.TeamcityReporter;
                                                       ^
            TypeError: undefined is not a function
                at /usr/local/lib/node_modules/jasmine-node/lib/jasmine-node/reporter.js:336:44
                at Object.<anonymous> (/usr/local/lib/node_modules/jasmine-node/lib/jasmine-node/reporter.js:342:3)
                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 Object.<anonymous> (/usr/local/lib/node_modules/jasmine-node/lib/jasmine-node/index.js:34:21)
                at Module._compile (module.js:456:26)
4

1 に答える 1

0

古いバージョンにダウングレードすると、問題が解決しました

      jasmine-node@1.14.2

ソース:

コマンド プロンプトから実行すると jasmine-node にエラーが表示される

https://github.com/larrymyers/jasmine-reporters/issues/63

https://github.com/mheevery/jasmine-node/pull/332

于 2014-07-10T05:47:31.067 に答える