在Openshift上运行MEAN网站时,非常奇怪的Mongoose/MongoDB问题

Very weird Mongoose/MongoDB issue when running MEAN site on Openshift

本文关键字:Mongoose 问题 MongoDB 非常 Openshift 运行 MEAN 网站      更新时间:2023-09-26

我已经上传了一个网站到Openshift…我不得不做很多改变……包括学习版本控制和nvm(节点版本管理器)。我不得不经历很多npm版本的东西,只是为了让请求发生(也就是说,服务器使用express版本3.2.5,而我在本地使用4.2.0)。无论如何,现在我在这个奇怪的问题上,猫鼬函数- Model.findById()似乎根本无法找到一个对象,显然是在数据库中通过_id属性。流程是这样的(你可以自己在这里看到它- http://hackabox-eamonbenproject.rhcloud.com -我的项目):

当我试图在页面上加载一个帖子,你可以查看所有的帖子信息…GET请求发生,一条路由在这里被express调用:

app.get('/api/posts/:id', api.showinfo);

api.showinfo函数是这个目前(虽然我已经尝试了很多不同的东西):

exports.showinfo = function(req, res, next) {
  var postId = req.params.id;
  Post.findById(postId, function (err, post) {
    console.log("what did u find?" + post);
    res.send({ postinfo: post.postinfo });
    //res.json(post);
  });
};

console.log("what did u find?" + post)输出null,这意味着mongoose的findById函数出了问题。

我已经登录以确保postId是正确的id…所以这不是问题所在。我还尝试将res.send({ postinfo: post.postinfo });更改为res.json(post), res.send(post.postinfo), res.send({ profile: post.postinfo }) -没有运气。

有谁知道为什么findById可能找不到任何东西…post.postinfo指的是我的Mongoose虚拟模式,看起来像这样:

PostSchema
  .virtual('postinfo')
    .get(function() {
      return {
        '_id': this._id,
        'posttitle': this.posttitle,
        'content': this.content,
        'username': this.username,
        'date': this.date
      };
    });

我认为使用res.send在我的种子中如何在用户认证系统中使用它可能会工作-它在那里像这样使用-它工作得很好:

exports.show = function (req, res, next) {
  var userId = req.params.id;
  User.findById(userId, function (err, user) {
    if (err) return next(err);
    if (!user) return res.send(404);
    res.send({ profile: user.profile });
  });
};

由于某种原因,当我将它与我制作的Post模型一起使用时,它不想在Openshift上工作,我很确定它在本地工作。

任何想法?

在将我的MongoDB本地版本降级到2.4.6(与openshift服务器版本相同)之后-该网站开始在本地遇到与服务器上相同的问题…所以这绝对是一个环境问题——我猜一些依赖于Mongo的软件包也需要更改他们的版本——所以我打算尝试一下,看看这是否有帮助。当我在本地运行种子时,它似乎是一个版本冲突的问题-这里是我的package.json文件中所有与mongo相关的npm包:

{
  "name": "hackabox",
  "version": "0.0.0",
  "dependencies": {
    ...
    "mongoose": "~3.8.8",
    "connect-mongo": "mrzepinski/connect-mongo#2135988",
    ...
  },
  ...
}

有没有人知道MongoDB v2.4.6使用什么版本?

我尝试了Mongoose v3.5.0,它不起作用-我正在查看提交日期,似乎是在MongoDB v2.4.6发布的时候。需要更新/降级哪些其他包才能与openshift服务器同步?

做了一些事情,没有运气-但最终我结束了ssh到openshift服务器并运行:

npm list -g --depth=0

它以EACCES错误响应-但它也吐出了所有的版本号-所以它们是:

glob error { [Error: EACCES, readdir '/opt/rh/nodejs010/root/usr/lib/node_modules/npm/man']
  errno: 3,
  code: 'EACCES',
  path: '/opt/rh/nodejs010/root/usr/lib/node_modules/npm/man' }
/opt/rh/nodejs010/root/usr/lib
├── abbrev@1.0.4
├── ansi@0.2.1
├── ansicolors@0.3.2
├── ansistyles@0.1.3
├── archy@0.0.2
├── asn1@0.1.11
├── assert-plus@0.1.4
├── async@0.2.9
├── aws-sign@0.3.0
├── bignumber.js@1.1.1
├── block-stream@0.0.7
├── boom@0.4.2
├── bson@0.2.3
├── buffer-crc32@0.2.1
├── bytes@0.2.1
├── child-process-close@0.1.1
├── chmodr@0.1.0
├── chownr@0.0.1
├── cmd-shim@1.1.0
├── colors@0.6.2
├── columnify@0.1.2
├── combined-stream@0.0.4
├── commander@1.1.1
├── config-chain@1.1.8
├── connect@2.7.10
├── cookie@0.1.0
├── cookie-jar@0.3.0
├── cookie-signature@1.0.1
├── couch-login@0.1.18
├── cryptiles@0.2.2
├── ctype@0.5.3
├── debug@0.7.2
├── delayed-stream@0.0.5
├── editor@0.0.5
├── express@3.2.5
├── forever-agent@0.5.0
├── form-data@0.1.1
├── formidable@1.0.14
├── fresh@0.2.0
├── fstream@0.1.25
├── fstream-ignore@0.0.7
├── fstream-npm@0.1.6
├── generic-pool@2.0.3
├── github-url-from-git@1.1.1
├── github-url-from-username-repo@0.0.2
├── glob@3.2.8
├── graceful-fs@2.0.0
├── hawk@1.0.0
├── hoek@0.9.1
├── http-signature@0.10.0
├── inherits@2.0.0
├── ini@1.1.0
├── init-package-json@0.0.14
├── json-stringify-safe@5.0.0
├── keypress@0.2.1
├── lockfile@0.4.2
├── lru-cache@2.5.0
├── methods@0.0.1
├── mime@1.2.11
├── minimatch@0.2.14
├── mkdirp@0.3.5
├── mongodb@1.3.19
├── mute-stream@0.0.4
├── mysql@2.0.0-alpha9
├── nan@0.4.4
├── node-gyp@0.12.2
├── node-static@0.6.9
├── node-uuid@1.4.1
├── nopt@2.1.2
├── normalize-package-data@0.2.8
├── npm@*
├── npm-registry-client@0.3.3
├── npm-user-validate@0.0.3
├── npmconf@0.1.12
├── npmlog@0.0.6
├── oauth-sign@0.3.0
├── once@1.3.0
├── opener@1.3.0
├── openshift-node-web-proxy@*
├── optimist@0.4.0
├── options@0.0.5
├── osenv@0.0.3
├── path-is-inside@1.0.0
├── pause@0.0.1
├── pg@0.12.3
├── promzard@0.2.0
├── proto-list@1.2.2
├── qs@0.6.5
├── range-parser@0.0.4
├── read@1.0.5
├── read-installed@0.2.4
├── read-package-json@1.1.6
├── request@2.25.0
├── require-all@0.0.8
├── retry@0.6.0
├── rimraf@2.2.6
├── semver@2.1.0
├── send@0.1.4
├── sha@1.2.1
├── sigmund@1.0.0
├── slide@1.1.5
├── sntp@0.2.4
├── supervisor@0.5.2
├── tar@0.1.19
├── text-table@0.2.0
├── tinycolor@0.0.1
├── tunnel-agent@0.3.0
├── uid-number@0.0.3
├── which@1.0.5
├── wordwrap@0.0.2
└── ws@0.4.25

我真的需要让我所有的全局npm包和openshift上的包都是相同的版本来确保它能工作吗(对于那些相关的)?

我在本地运行npm list -g -这是我得到的:

/usr/lib
├─┬ bower@1.3.3
│ ├── abbrev@1.0.5
│ ├── archy@0.0.2
│ ├─┬ bower-config@0.5.0
│ │ ├── mout@0.6.0
│ │ └─┬ optimist@0.6.1
│ │   ├── minimist@0.0.8
│ │   └── wordwrap@0.0.2
│ ├── bower-endpoint-parser@0.2.1
│ ├─┬ bower-json@0.4.0
│ │ ├── deep-extend@0.2.8
│ │ └── intersect@0.0.3
│ ├── bower-logger@0.2.2
│ ├─┬ bower-registry-client@0.2.0
│ │ ├── async@0.2.10
│ │ ├─┬ bower-config@0.4.5
│ │ │ ├── mout@0.6.0
│ │ │ └─┬ optimist@0.6.1
│ │ │   ├── minimist@0.0.8
│ │ │   └── wordwrap@0.0.2
│ │ ├── lru-cache@2.3.1
│ │ ├─┬ request@2.27.0
│ │ │ ├── aws-sign@0.3.0
│ │ │ ├── cookie-jar@0.3.0
│ │ │ ├── forever-agent@0.5.2
│ │ │ ├─┬ form-data@0.1.2
│ │ │ │ └─┬ combined-stream@0.0.4
│ │ │ │   └── delayed-stream@0.0.5
│ │ │ ├─┬ hawk@1.0.0
│ │ │ │ ├── boom@0.4.2
│ │ │ │ ├── cryptiles@0.2.2
│ │ │ │ ├── hoek@0.9.1
│ │ │ │ └── sntp@0.2.4
│ │ │ ├─┬ http-signature@0.10.0
│ │ │ │ ├── asn1@0.1.11
│ │ │ │ ├── assert-plus@0.1.2
│ │ │ │ └── ctype@0.5.2
│ │ │ ├── json-stringify-safe@5.0.0
│ │ │ ├── mime@1.2.11
│ │ │ ├── node-uuid@1.4.1
│ │ │ ├── oauth-sign@0.3.0
│ │ │ ├── qs@0.6.6
│ │ │ └── tunnel-agent@0.3.0
│ │ └── request-replay@0.2.0
│ ├─┬ cardinal@0.4.4
│ │ ├── ansicolors@0.2.1
│ │ └─┬ redeyed@0.4.4
│ │   └── esprima@1.0.4
│ ├─┬ chalk@0.4.0
│ │ ├── ansi-styles@1.0.0
│ │ ├── has-color@0.1.7
│ │ └── strip-ansi@0.1.1
│ ├── chmodr@0.1.0
│ ├─┬ decompress-zip@0.0.6
│ │ ├─┬ binary@0.3.0
│ │ │ ├── buffers@0.1.1
│ │ │ └─┬ chainsaw@0.1.0
│ │ │   └── traverse@0.3.9
│ │ ├── mkpath@0.1.0
│ │ ├─┬ readable-stream@1.1.13-1
│ │ │ ├── core-util-is@1.0.1
│ │ │ ├── inherits@2.0.1
│ │ │ ├── isarray@0.0.1
│ │ │ └── string_decoder@0.10.25-1
│ │ └─┬ touch@0.0.2
│ │   └── nopt@1.0.10
│ ├─┬ fstream@0.1.25
│ │ └── inherits@2.0.1
│ ├─┬ fstream-ignore@0.0.7
│ │ ├── inherits@2.0.1
│ │ └─┬ minimatch@0.2.14
│ │   └── sigmund@1.0.0
│ ├─┬ glob@3.2.9
│ │ ├── inherits@2.0.1
│ │ └─┬ minimatch@0.2.14
│ │   └── sigmund@1.0.0
│ ├── graceful-fs@2.0.3
│ ├─┬ handlebars@1.3.0
│ │ ├─┬ optimist@0.3.7
│ │ │ └── wordwrap@0.0.2
│ │ └─┬ uglify-js@2.3.6
│ │   ├── async@0.2.10
│ │   └─┬ source-map@0.1.33
│ │     └── amdefine@0.1.0
│ ├─┬ inquirer@0.4.1
│ │ ├── async@0.2.10
│ │ ├─┬ cli-color@0.2.3
│ │ │ ├── es5-ext@0.9.2
│ │ │ └─┬ memoizee@0.2.6
│ │ │   ├── event-emitter@0.2.2
│ │ │   └── next-tick@0.1.0
│ │ ├── lodash@2.4.1
│ │ ├── mute-stream@0.0.4
│ │ ├── readline2@0.1.0
│ │ └── through@2.3.4
│ ├─┬ insight@0.3.1
│ │ ├── async@0.2.10
│ │ ├─┬ configstore@0.2.3
│ │ │ ├─┬ js-yaml@3.0.2
│ │ │ │ ├─┬ argparse@0.1.15
│ │ │ │ │ ├── underscore@1.4.4
│ │ │ │ │ └── underscore.string@2.3.3
│ │ │ │ └── esprima@1.0.4
│ │ │ └── uuid@1.4.1
│ │ ├─┬ lodash.debounce@2.4.1
│ │ │ ├── lodash.isfunction@2.4.1
│ │ │ ├─┬ lodash.isobject@2.4.1
│ │ │ │ └── lodash._objecttypes@2.4.1
│ │ │ └─┬ lodash.now@2.4.1
│ │ │   └── lodash._isnative@2.4.1
│ │ ├── object-assign@0.1.2
│ │ └─┬ request@2.27.0
│ │   ├── aws-sign@0.3.0
│ │   ├── cookie-jar@0.3.0
│ │   ├── forever-agent@0.5.2
│ │   ├─┬ form-data@0.1.2
│ │   │ └─┬ combined-stream@0.0.4
│ │   │   └── delayed-stream@0.0.5
│ │   ├─┬ hawk@1.0.0
│ │   │ ├── boom@0.4.2
│ │   │ ├── cryptiles@0.2.2
│ │   │ ├── hoek@0.9.1
│ │   │ └── sntp@0.2.4
│ │   ├─┬ http-signature@0.10.0
│ │   │ ├── asn1@0.1.11
│ │   │ ├── assert-plus@0.1.2
│ │   │ └── ctype@0.5.2
│ │   ├── json-stringify-safe@5.0.0
│ │   ├── mime@1.2.11
│ │   ├── node-uuid@1.4.1
│ │   ├── oauth-sign@0.3.0
│ │   ├── qs@0.6.6
│ │   └── tunnel-agent@0.3.0
│ ├── is-root@0.1.0
│ ├── junk@0.3.0
│ ├── lockfile@0.4.2
│ ├── lru-cache@2.5.0
│ ├── mkdirp@0.3.5
│ ├── mout@0.9.1
│ ├── nopt@2.2.0
│ ├── opn@0.1.1
│ ├── osenv@0.0.3
│ ├─┬ p-throttler@0.0.1
│ │ └── q@0.9.7
│ ├─┬ promptly@0.2.0
│ │ └─┬ read@1.0.5
│ │   └── mute-stream@0.0.4
│ ├── q@1.0.1
│ ├─┬ request@2.34.0
│ │ ├── aws-sign2@0.5.0
│ │ ├── forever-agent@0.5.2
│ │ ├─┬ form-data@0.1.2
│ │ │ ├── async@0.2.10
│ │ │ └─┬ combined-stream@0.0.4
│ │ │   └── delayed-stream@0.0.5
│ │ ├─┬ hawk@1.0.0
│ │ │ ├── boom@0.4.2
│ │ │ ├── cryptiles@0.2.2
│ │ │ ├── hoek@0.9.1
│ │ │ └── sntp@0.2.4
│ │ ├─┬ http-signature@0.10.0
│ │ │ ├── asn1@0.1.11
│ │ │ ├── assert-plus@0.1.2
│ │ │ └── ctype@0.5.2
│ │ ├── json-stringify-safe@5.0.0
│ │ ├── mime@1.2.11
│ │ ├── node-uuid@1.4.1
│ │ ├── oauth-sign@0.3.0
│ │ ├── qs@0.6.6
│ │ ├─┬ tough-cookie@0.12.1
│ │ │ └── punycode@1.2.4
│ │ └── tunnel-agent@0.3.0
│ ├─┬ request-progress@0.3.1
│ │ └── throttleit@0.0.2
│ ├── retry@0.6.0
│ ├── rimraf@2.2.6
│ ├── semver@2.2.1
│ ├─┬ shell-quote@1.4.1
│ │ ├── array-filter@0.0.1
│ │ ├── array-map@0.0.0
│ │ ├── array-reduce@0.0.0
│ │ └── jsonify@0.0.0
│ ├── stringify-object@0.2.0
│ ├─┬ tar@0.1.19
│ │ ├── block-stream@0.0.7
│ │ └── inherits@2.0.1
│ ├── tmp@0.0.23
│ ├─┬ update-notifier@0.1.8
│ │ ├─┬ configstore@0.2.3
│ │ │ ├─┬ js-yaml@3.0.2
│ │ │ │ ├─┬ argparse@0.1.15
│ │ │ │ │ ├── underscore@1.4.4
│ │ │ │ │ └── underscore.string@2.3.3
│ │ │ │ └── esprima@1.0.4
│ │ │ ├── object-assign@0.1.2
│ │ │ └── uuid@1.4.1
│ │ ├─┬ request@2.27.0
│ │ │ ├── aws-sign@0.3.0
│ │ │ ├── cookie-jar@0.3.0
│ │ │ ├── forever-agent@0.5.2
│ │ │ ├─┬ form-data@0.1.2
│ │ │ │ ├── async@0.2.10
│ │ │ │ └─┬ combined-stream@0.0.4
│ │ │ │   └── delayed-stream@0.0.5
│ │ │ ├─┬ hawk@1.0.0
│ │ │ │ ├── boom@0.4.2
│ │ │ │ ├── cryptiles@0.2.2
│ │ │ │ ├── hoek@0.9.1
│ │ │ │ └── sntp@0.2.4
│ │ │ ├─┬ http-signature@0.10.0
│ │ │ │ ├── asn1@0.1.11
│ │ │ │ ├── assert-plus@0.1.2
│ │ │ │ └── ctype@0.5.2
│ │ │ ├── json-stringify-safe@5.0.0
│ │ │ ├── mime@1.2.11
│ │ │ ├── node-uuid@1.4.1
│ │ │ ├── oauth-sign@0.3.0
│ │ │ ├── qs@0.6.6
│ │ │ └── tunnel-agent@0.3.0
│ │ └── semver@2.1.0
│ └── which@1.0.5
├─┬ express@3.2.5
│ ├── buffer-crc32@0.2.1
│ ├── commander@0.6.1
│ ├─┬ connect@2.7.10
│ │ ├── bytes@0.2.0
│ │ ├── cookie@0.0.5
│ │ ├── formidable@1.0.14
│ │ ├── pause@0.0.1
│ │ └── qs@0.6.5
│ ├── cookie@0.1.0
│ ├── cookie-signature@1.0.1
│ ├─┬ debug@1.0.4
│ │ └── ms@0.6.2
│ ├── fresh@0.1.0
│ ├── methods@0.0.1
│ ├── mkdirp@0.3.4
│ ├── range-parser@0.0.4
│ └─┬ send@0.1.0
│   └── mime@1.2.6
├─┬ express-generator@4.2.0
│ ├─┬ commander@1.3.2
│ │ └── keypress@0.1.0
│ └── mkdirp@0.3.5
├─┬ generator-angular@0.8.0
│ ├─┬ chalk@0.4.0
│ │ ├── ansi-styles@1.0.0
│ │ ├── has-color@0.1.7
│ │ └── strip-ansi@0.1.1
│ ├─┬ wiredep@1.0.0
│ │ ├─┬ chalk@0.1.1
│ │ │ ├── ansi-styles@0.1.2
│ │ │ └── has-color@0.1.7
│ │ ├─┬ glob@3.2.11
│ │ │ ├── inherits@2.0.1
│ │ │ └─┬ minimatch@0.3.0
│ │ │   ├── lru-cache@2.5.0
│ │ │   └── sigmund@1.0.0
│ │ └── lodash@1.3.1
│ └─┬ yeoman-generator@0.16.0
│   ├── async@0.2.10
│   ├─┬ cheerio@0.13.1
│   │ ├─┬ CSSselect@0.4.1
│   │ │ ├── CSSwhat@0.4.7
│   │ │ └─┬ domutils@1.4.3
│   │ │   └── domelementtype@1.1.1
│   │ ├── entities@0.5.0
│   │ ├─┬ htmlparser2@3.4.0
│   │ │ ├── domelementtype@1.1.1
│   │ │ ├── domhandler@2.2.0
│   │ │ ├── domutils@1.3.0
│   │ │ └─┬ readable-stream@1.1.13-1
│   │ │   ├── core-util-is@1.0.1
│   │ │   ├── inherits@2.0.1
│   │ │   ├── isarray@0.0.1
│   │ │   └── string_decoder@0.10.25-1
│   │ └── underscore@1.5.2
│   ├── class-extend@0.1.1
│   ├── dargs@0.1.0
│   ├── debug@0.7.4
│   ├── diff@1.0.8
│   ├─┬ download@0.1.17
│   │ ├─┬ decompress@0.2.3
│   │ │ ├── adm-zip@0.4.4
│   │ │ ├─┬ extname@0.1.2
│   │ │ │ └── ext-list@0.1.0
│   │ │ ├── map-key@0.1.4
│   │ │ ├─┬ stream-combiner@0.0.4
│   │ │ │ └── duplexer@0.1.1
│   │ │ ├─┬ tar@0.1.19
│   │ │ │ ├── block-stream@0.0.7
│   │ │ │ ├─┬ fstream@0.1.25
│   │ │ │ │ └── graceful-fs@2.0.3
│   │ │ │ └── inherits@2.0.1
│   │ │ └─┬ tempfile@0.1.3
│   │ │   └── uuid@1.4.1
│   │ ├── each-async@0.1.3
│   │ ├── get-stdin@0.1.0
│   │ ├── get-urls@0.1.2
│   │ ├─┬ nopt@2.2.1
│   │ │ └── abbrev@1.0.5
│   │ ├─┬ request@2.36.0
│   │ │ ├── aws-sign2@0.5.0
│   │ │ ├── forever-agent@0.5.2
│   │ │ ├─┬ form-data@0.1.2
│   │ │ │ └─┬ combined-stream@0.0.4
│   │ │ │   └── delayed-stream@0.0.5
│   │ │ ├─┬ hawk@1.0.0
│   │ │ │ ├── boom@0.4.2
│   │ │ │ ├── cryptiles@0.2.2
│   │ │ │ ├── hoek@0.9.1
│   │ │ │ └── sntp@0.2.4
│   │ │ ├─┬ http-signature@0.10.0
│   │ │ │ ├── asn1@0.1.11
│   │ │ │ ├── assert-plus@0.1.2
│   │ │ │ └── ctype@0.5.2
│   │ │ ├── json-stringify-safe@5.0.0
│   │ │ ├── node-uuid@1.4.1
│   │ │ ├── oauth-sign@0.3.0
│   │ │ ├── qs@0.6.6
│   │ │ ├─┬ tough-cookie@0.12.1
│   │ │ │ └── punycode@1.2.4
│   │ │ └── tunnel-agent@0.4.0
│   │ └─┬ through2@0.4.2
│   │   ├─┬ readable-stream@1.0.27-1
│   │   │ ├── core-util-is@1.0.1
│   │   │ ├── inherits@2.0.1
│   │   │ ├── isarray@0.0.1
│   │   │ └── string_decoder@0.10.25-1
│   │   └─┬ xtend@2.1.2
│   │     └── object-keys@0.4.0
│   ├─┬ file-utils@0.1.5
│   │ ├── isbinaryfile@0.1.9
│   │ ├── lodash@2.1.0
│   │ └─┬ minimatch@0.2.14
│   │   ├── lru-cache@2.5.0
│   │   └── sigmund@1.0.0
│   ├── findup-sync@0.1.3
│   ├─┬ glob@3.2.11
│   │ ├── inherits@2.0.1
│   │ └─┬ minimatch@0.3.0
│   │   ├── lru-cache@2.5.0
│   │   └── sigmund@1.0.0
│   ├── iconv-lite@0.2.11
│   ├─┬ inquirer@0.4.1
│   │ ├─┬ cli-color@0.2.3
│   │ │ ├── es5-ext@0.9.2
│   │ │ └─┬ memoizee@0.2.6
│   │ │   ├── event-emitter@0.2.2
│   │ │   └── next-tick@0.1.0
│   │ ├── mute-stream@0.0.4
│   │ ├── readline2@0.1.0
│   │ └── through@2.3.4
│   ├── isbinaryfile@2.0.1
│   ├── lodash@2.4.1
│   ├── mime@1.2.11
│   ├── mkdirp@0.3.5
│   ├─┬ request@2.30.0
│   │ ├── aws-sign2@0.5.0
│   │ ├── forever-agent@0.5.2
│   │ ├─┬ form-data@0.1.2
│   │ │ └─┬ combined-stream@0.0.4
│   │ │   └── delayed-stream@0.0.5
│   │ ├─┬ hawk@1.0.0
│   │ │ ├── boom@0.4.2
│   │ │ ├── cryptiles@0.2.2
│   │ │ ├── hoek@0.9.1
│   │ │ └── sntp@0.2.4
│   │ ├─┬ http-signature@0.10.0
│   │ │ ├── asn1@0.1.11
│   │ │ ├── assert-plus@0.1.2
│   │ │ └── ctype@0.5.2
│   │ ├── json-stringify-safe@5.0.0
│   │ ├── node-uuid@1.4.1
│   │ ├── oauth-sign@0.3.0
│   │ ├── qs@0.6.6
│   │ ├─┬ tough-cookie@0.9.15
│   │ │ └── punycode@1.2.4
│   │ └── tunnel-agent@0.3.0
│   ├── rimraf@2.2.8
│   ├── shelljs@0.2.6
│   ├── text-table@0.2.0
│   └── underscore.string@2.3.3
├─┬ generator-angular-fullstack@1.4.2
│ ├─┬ chalk@0.4.0
│ │ ├── ansi-styles@1.0.0
│ │ ├── has-color@0.1.7
│ │ └── strip-ansi@0.1.1
│ ├─┬ wiredep@0.4.2
│ │ ├─┬ chalk@0.1.1
│ │ │ ├── ansi-styles@0.1.2
│ │ │ └── has-color@0.1.7
│ │ └── lodash@1.3.1
│ └─┬ yeoman-generator@0.16.0
│   ├── async@0.2.10
│   ├─┬ cheerio@0.13.1
│   │ ├─┬ CSSselect@0.4.1
│   │ │ ├── CSSwhat@0.4.5
│   │ │ └─┬ domutils@1.4.3
│   │ │   └── domelementtype@1.1.1
│   │ ├── entities@0.5.0
│   │ ├─┬ htmlparser2@3.4.0
│   │ │ ├── domelementtype@1.1.1
│   │ │ ├── domhandler@2.2.0
│   │ │ ├── domutils@1.3.0
│   │ │ └─┬ readable-stream@1.1.13-1
│   │ │   ├── core-util-is@1.0.1
│   │ │   ├── inherits@2.0.1
│   │ │   ├── isarray@0.0.1
│   │ │   └── string_decoder@0.10.25-1
│   │ └── underscore@1.5.2
│   ├── class-extend@0.1.1
│   ├── dargs@0.1.0
│   ├── debug@0.7.4
│   ├── diff@1.0.8
│   ├─┬ download@0.1.16
│   │ ├─┬ decompress@0.2.3
│   │ │ ├── adm-zip@0.4.4
│   │ │ ├─┬ extname@0.1.2
│   │ │ │ └── ext-list@0.1.0
│   │ │ ├─┬ map-key@0.1.1
│   │ │ │ └── mout@0.9.1
│   │ │ ├─┬ stream-combiner@0.0.4
│   │ │ │ └── duplexer@0.1.1
│   │ │ ├─┬ tar@0.1.19
│   │ │ │ ├── block-stream@0.0.7
│   │ │ │ ├─┬ fstream@0.1.25
│   │ │ │ │ └── graceful-fs@2.0.3
│   │ │ │ └── inherits@2.0.1
│   │ │ └─┬ tempfile@0.1.3
│   │ │   └── uuid@1.4.1
│   │ ├── each-async@0.1.2
│   │ ├── get-stdin@0.1.0
│   │ ├── get-urls@0.1.1
│   │ ├─┬ nopt@2.2.0
│   │ │ └── abbrev@1.0.5
│   │ ├─┬ request@2.34.0
│   │ │ ├── aws-sign2@0.5.0
│   │ │ ├── forever-agent@0.5.2
│   │ │ ├─┬ form-data@0.1.2
│   │ │ │ └─┬ combined-stream@0.0.4
│   │ │ │   └── delayed-stream@0.0.5
│   │ │ ├─┬ hawk@1.0.0
│   │ │ │ ├── boom@0.4.2
│   │ │ │ ├── cryptiles@0.2.2
│   │ │ │ ├── hoek@0.9.1
│   │ │ │ └── sntp@0.2.4
│   │ │ ├─┬ http-signature@0.10.0
│   │ │ │ ├── asn1@0.1.11
│   │ │ │ ├── assert-plus@0.1.2
│   │ │ │ └── ctype@0.5.2
│   │ │ ├── json-stringify-safe@5.0.0
│   │ │ ├── node-uuid@1.4.1
│   │ │ ├── oauth-sign@0.3.0
│   │ │ ├── qs@0.6.6
│   │ │ ├─┬ tough-cookie@0.12.1
│   │ │ │ └── punycode@1.2.4
│   │ │ └── tunnel-agent@0.3.0
│   │ └─┬ through2@0.4.1
│   │   ├─┬ readable-stream@1.0.27-1
│   │   │ ├── core-util-is@1.0.1
│   │   │ ├── inherits@2.0.1
│   │   │ ├── isarray@0.0.1
│   │   │ └── string_decoder@0.10.25-1
│   │   └─┬ xtend@2.1.2
│   │     └── object-keys@0.4.0
│   ├─┬ file-utils@0.1.5
│   │ ├── isbinaryfile@0.1.9
│   │ ├── lodash@2.1.0
│   │ └─┬ minimatch@0.2.14
│   │   ├── lru-cache@2.5.0
│   │   └── sigmund@1.0.0
│   ├── findup-sync@0.1.3
│   ├─┬ glob@3.2.9
│   │ ├── inherits@2.0.1
│   │ └─┬ minimatch@0.2.14
│   │   ├── lru-cache@2.5.0
│   │   └── sigmund@1.0.0
│   ├── iconv-lite@0.2.11
│   ├─┬ inquirer@0.4.1
│   │ ├─┬ cli-color@0.2.3
│   │ │ ├── es5-ext@0.9.2
│   │ │ └─┬ memoizee@0.2.6
│   │ │   ├── event-emitter@0.2.2
│   │ │   └── next-tick@0.1.0
│   │ ├── mute-stream@0.0.4
│   │ ├── readline2@0.1.0
│   │ └── through@2.3.4
│   ├── isbinaryfile@2.0.1
│   ├── lodash@2.4.1
│   ├── mime@1.2.11
│   ├── mkdirp@0.3.5
...

不能全部贴出来——这个问题已经很长了,哈哈。

所以我想我可以检查一下,确保它们都是一样的…但有人知道哪一个对我现在的问题最重要吗?

天哪,那太烦人了!

这几天我一直在努力让我的网站在openshift上工作。我花了最后一两天的时间来确保我在计算机上使用的所有npm包版本与openshift上使用的版本相同。在我同步了所有的版本之后,我做了很多工作来重构我的代码,但我最终让它工作了。

我必须弄清楚的主要错误是,当我试图做一个PUT请求,即使我没有改变_id字段-它会给我这个错误:

MongoError: Mod on _id not allowed

我最终意识到我需要创建一个具有所有相同信息的对象,只是没有_id字段以使更新工作。

除此之外,它只是花了很多的修修补补得到正确的-这是我的劳动的结果- http://hackabox-eamonbenproject.rhcloud.com/-问题我一直有有关的论坛我正在做,所以检查出来-它是全功能的