【问题标题】:Yahoo fluxible "shell is not defined" on WindowsWindows 上的 Yahoo Fluxible“未定义外壳”
【发布时间】:2016-02-07 07:27:27
【问题描述】:

fluxible 生成的应用程序的webpack-dev-server.js 中的以下行 报错'shell未定义'

shell.env.PORT = shell.env.PORT || 3001;
shell.exec('"./node_modules/.bin/nodemon" start.js -e js,jsx', function () {});

我做到了

var shell = require('child_process');

.listen(3000, function () {
    shell.env = process.env;
    shell.env.port = 3001;
    shell.exec('"./node_modules/.bin/nodemon" start.js -e js,jsx', function () {});
    console.log('Webpack Dev Server listening on port 3000');
});

更改后,服务器启动时没有错误,但更改后自动重新启动仍然不起作用。我做错了什么?

【问题讨论】:

    标签: javascript reactjs flux reactjs-flux fluxible


    【解决方案1】:

    看起来像是生成器中的一个错误,我将修复。

    在您的代码中将第一行更改为 var shell = require('shelljs'); 并查看是否可以为您解决问题。

    【讨论】:

      猜你喜欢
      • 2010-09-07
      • 2013-04-11
      • 2020-05-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-29
      • 2011-01-06
      • 1970-01-01
      相关资源
      最近更新 更多