1

几天来我一直在搞乱 node.js,在使用 node.js/express/angularjs/mongodb 创建了一些示例之后,我尝试升级到 mean.io。

经过一番尝试和错误,我终于设法在 localhost:3000 上运行主应用程序。

这是我的FB截图 在此处输入图像描述

请注意,该bower_componentsurl 具有正确的 url,但文件packages夹中文件的链接具有\分隔符。我知道这是 Windows 的问题,因为 ZendFramework2(PHP) 的 zip 文件生成器(使用DIRECTORY_SEPARATOR常量)也有类似的问题;

那么我在这里错过了什么?我应该在 Windows 中设置一些特殊配置吗?

我应该提到我已经完成了两次这些步骤:

  • npm cache clean
  • bower cache clean
  • npm update -g npm
  • npm update -g grunt
  • npm update -g grunt-cli
  • npm update -g bower
  • npm install -g grunt
  • npm install -g grunt-cli
  • npm install -g bower
  • npm install
  • npm update

更新

在 \node_modules\meanio\lib\aggregation.js;line:205

  Meanio.prototype.Module.prototype.aggregateAsset = function(type, asset, options) {
    options = options || {};
    if (!options.inline && !options.absolute && !options.url) {
      asset = path.join(Meanio.modules[this.name].source, this.name, 'public/assets', type, asset);
    }
    Meanio.aggregate(type, asset, options, Meanio.Singleton.config.clean);
      };

path.join正在创建路径,\而不是/在 url 中不是有效的文件路径。那么解决此问题以在 Windows 上运行的正确方法是什么?

4

0 回答 0