错误:无法找到从`ember-data / setup-container'导入的模块`ember-data / -private`

时间:2017-09-06 11:04:37

标签: ember.js ember-cli

在我上次构建应用程序之后一切正常,但是两天前我已经上传了新版本的应用程序,这个错误阻止我在开发环境中启动应用程序。

错误:无法找到从ember-data/-private

导入的模块ember-data/setup-container

我不太确定在哪里查看或如何调查此问题,如果我能提供任何额外信息,请告诉我。

RGDS

升级ember-data后,这是日志:

-----> emberjs app detected
-----> Setting NPM_CONFIG_PRODUCTION to false to install ember-cli toolchain
-----> Fetching buildpack heroku/nodejs-v98
-----> Node.js detected
-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=false
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  >= 0.10.0
       engines.npm (package.json):   unspecified (use default)

       Resolving node version >= 0.10.0 via semver.io...
       Downloading and installing node 8.4.0...
       Using default npm version: 5.3.0
-----> Restoring cache
       Loading 2 from cacheDirectories (default):
       - node_modules
       - bower_components (not cached - skipping)
-----> Building dependencies
       Installing node modules (package.json)
       added 94 packages, removed 64 packages, updated 128 packages and moved 1 package in 20.502s
-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)
-----> Build succeeded!
-----> Fetching buildpack heroku/ember-cli-deploy
-----> ember-cli detected
-----> Restoring bower cache
-----> Restoring bower cache
-----> Installing bower dependencies
-----> Caching bower cache
-----> Building ember assets
WARNING: Node v8.4.0 has currently not been tested against Ember CLI and may result in unexpected behaviour.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
broccoli-babel-transpiler is opting out of caching due to a plugin that does not provide a caching strategy: `function () {
            return __dirname;
          }`.
Build failed.
File: ember-ajax/ajax-request.js
The Broccoli Plugin: [broccoli-persistent-filter:Babel] failed with:
TypeError: The plugin {"_parallelBabel":{"requireFile":"/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/ember-cli-htmlbars-inline-precompile/lib/require-from-worker","buildUsing":"build","params":{"templateCompilerPath":"/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/bower_components/ember/ember-template-compiler","parallelConfig":[]}}} didn't export a Plugin instance
    at PluginManager.validate (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/babel-core/lib/transformation/file/plugin-manager.js:164:13)
    at PluginManager.add (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/babel-core/lib/transformation/file/plugin-manager.js:213:10)
    at File.buildTransformers (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/babel-core/lib/transformation/file/index.js:237:21)
    atError running: ember build --environment production 2>&1
 new File (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/babel-core/lib/transformation/file/index.js:139:10)
    at Pipeline.transform (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at Babel.transform (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/broccoli-babel-transpiler/index.js:107:21)
    at Babel.processString (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/broccoli-babel-transpiler/index.js:206:25)
    at Promise.then.result.output (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/broccoli-persistent-filter/lib/strategies/persistent.js:41:23)
    at initializePromise (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/rsvp/dist/rsvp.js:589:5)
    at new Promise$1 (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/rsvp/dist/rsvp.js:1077:33)
The broccoli plugin was instantiated at: 
    at Babel.Plugin (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/broccoli-plugin/index.js:7:31)
    at Babel.Filter [as constructor] (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/broccoli-persistent-filter/index.js:62:10)
    at new Babel (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/broccoli-babel-transpiler/index.js:35:10)
    at EmberApp._addonTree (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/ember-cli/lib/broccoli/ember-app.js:910:29)
    at EmberApp._processedVendorTree (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/ember-cli/lib/broccoli/ember-app.js:944:20)
    at EmberApp._processedExternalTree (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/ember-cli/lib/broccoli/ember-app.js:975:21)
    at EmberApp.appAndDependencies (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/ember-cli/lib/broccoli/ember-app.js:1071:30)
    at EmberApp.javascript (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/ember-cli/lib/broccoli/ember-app.js:1201:34)
    at EmberApp.toArray (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/ember-cli/lib/broccoli/ember-app.js:1606:10)
    at EmberApp.toTree (/tmp/build_94c194f54986baa49826d9ec451f3d9c/nalla-design-nalla-site-7aba2cfe5b751fec7f9b091d42b7de840218687d/node_modules/ember-cli/lib/broccoli/ember-app.js:1628:30)
-----> Failed trying to compile heroku/ember-cli-deploy
 !     Push rejected, failed to compile emberjs app.
 !     Push failed

依赖关系:

  "devDependencies": {
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "^2.0.1",
"ember-cli": "2.8.0",
"ember-cli-active-link-wrapper": "0.3.2",
"ember-cli-app-version": "^1.0.0",
"ember-cli-autoprefixer": "0.6.0",
"ember-cli-babel": "^5.1.6",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-fastboot": "1.0.0-beta.12",
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-jshint": "^1.0.0",
"ember-cli-qunit": "^2.1.0",
"ember-cli-release": "^0.2.9",
"ember-cli-sri": "^2.1.0",
"ember-cli-stylus": "^1.0.6",
"ember-cli-swiper": "0.3.1",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "^2.14.2",
"ember-export-application-global": "^1.0.5",
"ember-font-awesome": "2.2.0",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"ember-welcome-page": "^1.0.1",
"ember-windoc": "0.1.8",
"liquid-fire": "0.26.4",
"loader.js": "^4.0.1"

1 个答案:

答案 0 :(得分:0)

这是一个非常猜测,但几天前我遇到了类似的问题并找到了解决方案: 余烬数据问题:Could not find module `ember-data/-private

增加Ember数据依赖性解决了我的问题。

npm install --save ember-data@2.14.2