path.join的参数必须是字符串'在ember服务和ember构建期间的typeerror

时间:2015-08-21 14:40:30

标签: ember.js ember-cli typeerror github-pages

我刚刚开始编写一些ember教程,我想尝试创建一个gh-pages分支,以便我可以主持项目。我正在查看有关如何执行此操作的教程并对config / environment.js进行了一些更改。我正在遵循ember-cli-github-pages中的步骤,但遇到了一些问题,所以我删除了分支并开始重试,但是现在当我尝试构建甚至运行服务器时,我收到以下错误。

TypeError: Arguments to path.join must be strings
at Object.posix.join (path.js:488:13)
at AddonDiscovery.<anonymous> (/usr/local/lib/node_modules/ember-cli/lib/models/addon-discovery.js:107:24)
at Array.map (native)
at AddonDiscovery.discoverFromDependencies (/usr/local/lib/node_modules/ember-cli/lib/models/addon-discovery.js:97:68)
at AddonDiscovery.discoverProjectAddons (/usr/local/lib/node_modules/ember-cli/lib/models/addon-discovery.js:45:31)
at Project.discoverAddons (/usr/local/lib/node_modules/ember-cli/lib/models/project.js:317:40)
at Project.initializeAddons (/usr/local/lib/node_modules/ember-cli/lib/models/project.js:336:8)
at Project.eachAddonCommand (/usr/local/lib/node_modules/ember-cli/lib/models/project.js:389:10)
at module.exports (/usr/local/lib/node_modules/ember-cli/lib/cli/lookup-command.js:34:13)
at CLI.<anonymous> (/usr/local/lib/node_modules/ember-cli/lib/cli/cli.js:35:26)

还是很新的,我在整个stackoverflow和谷歌搜索了一些关于出了什么问题的提示,以及如何修复它,但到目前为止还没有。这是我的environment.js文件的样子

module.exports = function(environment) {
    var ENV = {
        modulePrefix: '',
        environment: environment,
        baseURL: '/',
        locationType: 'auto',
        EmberENV: {
            FEATURES: {
                // Here you can enable experimental features on an ember canary build
                // e.g. 'with-controller': true
            }
        },

        APP: {
            // Here you can pass flags/options to your application instance
            // when it is created
        }
    };

    if (environment === 'development') {
        // ENV.APP.LOG_RESOLVER = true;
        // ENV.APP.LOG_ACTIVE_GENERATION = true;
        // ENV.APP.LOG_TRANSITIONS = true;
        // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
        // ENV.APP.LOG_VIEW_LOOKUPS = true;
    }

    if (environment === 'test') {
        // Testem prefers this...
        ENV.baseURL = '/';
        ENV.locationType = 'none';

        // keep test console output quieter
        ENV.APP.LOG_ACTIVE_GENERATION = false;
        ENV.APP.LOG_VIEW_LOOKUPS = false;

        ENV.APP.rootElement = '#ember-testing';
    }

    if (environment === 'production') {

    }

    return ENV;
};

任何提示或推动正确的方向将非常感激,或者我应该看看如何摆脱这个错误。

我正在使用mac os x

:> ember --version
version: 1.13.1
node: 0.12.7
npm: 2.12.1

更新

ember serve现在在全新项目中出现同样的错误

0 个答案:

没有答案