首页 文章

构建新初始化的插件时出错

提问于
浏览
-1

在我构建/服务我正在工作的插件的麻烦之后,我做了通常的步骤来修复(删除node_modules,npm clean,npm install,...)但没有成功 .
所以最后我正处于我通过 ember addon jeff-table 新创建一个新插件的阶段,以便将'old'无法正常工作的回购移植到那里....
插件创建成功:

安装addon create .bowerrc .... create .npmignore成功初始化git . 通过npm安装工具包 . 通过Bower安装的浏览器包 .

无论如何,在尝试构建未触及的插件时,我再次遇到相同的错误:

无法读取未定义的属性'0'TypeError:无法在EmberAddon.EmberApp._initVendorFiles(C:\ users \ jefff \ google drive \ www \ ember-addons \ jeff-table \ node_modules \ ember-)中读取未定义的属性'0' cli \ lib \ broccoli \ ember-app.js:317:55)在EmberAddon.EmberApp [作为appConstructor](C:\ users \ jefff \ google drive \ www \ ember-addons \ jeff-table \ node_modules \ ember-cli \ lib \ broccoli \ ember-app.js:94:8)在新的EmberAddon(C:\ users \ jefff \ google drive \ www \ ember-addons \ jeff-table \ node_modules \ ember-cli \ lib \ broccoli \ ember) -addon.js:38:8)在Class.mports的module.exports(C:\ users \ jefff \ google drive \ www \ ember-addons \ jeff-table \ ember-cli-build.js:6:13) Class中的.exports.Task.extend.setupBroccoliBuilder(C:\ users \ jefff \ google drive \ www \ ember-addons \ jeff-table \ node_modules \ ember-cli \ lib \ models \ builder.js:55:19) . module.exports.Task.extend.init(C:\ users \ jefff \ google drive \ www \ ember-addons \ jeff-table \ node_modules \ ember-cli \ lib \ models \ builder.js:89:10)at new类(C:\ users \ jefff \ google drive \ www \ ember-a ddons \ jeff-table \ node_modules \ ember-cli \ node_modules \ core-object \ core-object.js:18:12)在Class.module.exports.Task.extend.run(C:\ users \ jefff \ google drive) \ www \ ember-addons \ jeff-table \ node_modules \ ember-cli \ lib \ tasks \ serve.js:15:19)在C:\ users \ jefff \ google drive \ www \ ember-addons \ jeff-table \ node_modules \余烬-CLI \ lib中\命令\ serve.js:64:24

我怀疑GDrive搞砸了我的node_modules或smth,但是在全新安装时,情况并非如此(GDrive已切换) .
我没有碰过ember-cli的安装(不是我所知道的) .

有没有人知道这里可能出现什么问题?

ember-cli:2.5.0节点:4.2.2 os:win32 x64

3 回答

  • 0

    尝试将package.json中的lodash依赖项设置为早于4.17.0的版本 . 它是ember-cli的依赖,并于昨晚更新 . 我今天早上与我公司的一个项目有同样的错误和堆栈跟踪,它昨晚在CI系统中编译但今天早上失败,没有对项目进行任何更改 . 我比较了下载的依赖项,并且有一些新版本 . 第一个区别是lodash,所以我将4.16.6版本添加到我的package.json(昨晚工作的版本)和我的项目再次编译 .

    对于Node,我仍然是一个新手,所以可能有一个更好的解决方案,但这不是我第一次能够通过强制npm获取旧版本的依赖项来解决编译中断 .

  • 0

    同样的问题也影响了我的项目 .

    @Bloomy你是对的,错误来自这里/node_modules/ember-cli/lib/broccoli/ember-app.js:317:55通过简短的调试看来,从一个对象访问一个属性的问题是't exist, because, as I guess, lodash '避免深克隆._omit结果'https://github.com/lodash/lodash/commit/6c427b7a260183685b16d2624351529cda25ce81 .

    如果你将lodash的版本在ember-cli中放到以前的某个版本(仅适用于你的本地版本) - 你会看到它的工作原理 . 尚无法进行 生产环境 . 如果还没打开,打算在ember-cli插件中打开一张票:)

  • 0

    我也遇到了同样的问题,并在github上提出了以下问题

    https://github.com/ember-cli/ember-cli/issues/6432

    并且发现最近发布的lodash即 lodash@4.17.0 中有一个小错误就是破坏了它 . 因此,在发布补丁之前,请尝试使用 lodash@4.16.5 ,这应该可以解决您现在的问题 .

相关问题