Ember.js - Broccoli插件:[object Object]失败了:

时间:2016-11-28 10:04:57

标签: javascript ember.js npm broccolijs

我是ember的新手,并设置了一个沙盒来玩它。当我输入ember s命令时,我得到错误,但是 - 这就是奇怪的事情 - 只有当我打开Sublime Text(!?!)时才会出现错误。如果我关闭Sublime并在命令行上再次输入ember s,一切正常!

lykos@lykos-VirtualBox:~/My_Projects/ember_sandbox(master)$ ember s
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
File: /home/lykos/My_Projects/ember_sandbox/app
The Broccoli Plugin: [object Object] failed with:
Error: watch /home/lykos/My_Projects/ember_sandbox/app ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1429:19)
    at Object.fs.watch (fs.js:1456:11)
    at FSMonitor._measure (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/heimdalljs-fs-monitor/index.js:66:21)
    at Object.watch (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/heimdalljs-fs-monitor/index.js:82:30)
    at NodeWatcher.watchdir (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/sane/src/node_watcher.js:144:20)
    at new NodeWatcher (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/sane/src/node_watcher.js:45:8)
    at new sane (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/sane/index.js:17:12)
    at EventEmitter.Watcher_addWatchDir [as addWatchDir] (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/ember-cli-broccoli-sane-watcher/index.js:131:17)
    at /home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/broccoli-builder/lib/builder.js:112:35

The broccoli plugin was instantiated at:
    at WatchedDir.Directory (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/broccoli-source/index.js:14:31)
    at new WatchedDir (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/broccoli-source/index.js:58:13)
    at EmberApp._initOptions (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/lib/broccoli/ember-app.js:200:17)
    at new EmberApp (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/lib/broccoli/ember-app.js:121:8)
    at module.exports (/home/lykos/My_Projects/ember_sandbox/ember-cli-build.js:6:13)
    at CoreObject.setupBroccoliBuilder (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/lib/models/builder.js:70:19)
    at CoreObject.init (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/lib/models/builder.js:50:10)
    at CoreObject.superWrapper [as init] (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/core-object/lib/assign-properties.js:32:18)
    at CoreObject.Class (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/core-object/core-object.js:32:33)
    at CoreObject.run (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/lib/tasks/serve.js:15:19)

Livereload server on http://localhost:49152
Serving on http://localhost:4200/

以下是一些其他信息

$ ember -v
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
ember-cli: 2.9.1
node: 6.9.1
os: linux x64

我的package.json文件

{
  "name": "ember_sandbox",
  "version": "0.0.0",
  "description": "Small description for ember_sandbox goes here",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.12.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "broccoli-asset-rev": "^2.4.5",
    "ember-ajax": "^2.4.1",
    "ember-cli": "2.9.1",
    "ember-cli-app-version": "^2.0.0",
    "ember-cli-babel": "^5.1.7",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-htmlbars": "^1.0.10",
    "ember-cli-htmlbars-inline-precompile": "^0.3.3",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-jshint": "^1.0.4",
    "ember-cli-qunit": "^3.0.1",
    "ember-cli-release": "^0.2.9",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-test-loader": "^1.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-data": "^2.9.0",
    "ember-export-application-global": "^1.0.5",
    "ember-load-initializers": "^0.5.1",
    "ember-resolver": "^2.0.3",
    "loader.js": "^4.0.10"
  }
}

任何想法如何解决这个???

1 个答案:

答案 0 :(得分:0)

可能会发生此错误,因为NodeWatcher会耗尽文件监视,因为它达到了系统配置允许的最大值。

尝试应用此答案的解决方案:Node.JS Error: ENOSPC