html-next / ember-hammertime

TouchAction (aka "fastclick") Support for Ember Applications
MIT License
56 stars 23 forks source link

Breaks the build in 2.15-beta.1 #38

Closed vlascik closed 7 years ago

vlascik commented 7 years ago

If I add this addon to a new 2.15-beta.1 app, I'm getting build errors like these:

The Broccoli Plugin: [BroccoliMergeTrees: TreeMerger (preprocessedApp & templates)] failed with:
TypeError: Cannot read property 'visitors' of undefined
    at preprocess (P:\Projects\reproduction-build1\node_modules\ember-source\dist\ember-template-compiler.js:3921:47)
    at exports.precompile (P:\Projects\reproduction-build1\node_modules\ember-source\dist\ember-template-compiler.js:1551:42)
    at Object.exports.default (P:\Projects\reproduction-build1\node_modules\ember-source\dist\ember-template-compiler.js:16409:12)
    at Object.template (P:\Projects\reproduction-build1\node_modules\ember-cli-htmlbars\utils.js:29:40)
    at TemplateCompiler.processString (P:\Projects\reproduction-build1\node_modules\ember-cli-htmlbars\index.js:76:40)
    at Promise.then.result.output (P:\Projects\reproduction-build1\node_modules\broccoli-persistent-filter\lib\strategies\persistent.js:41:23)
    at initializePromise (P:\Projects\reproduction-build1\node_modules\rsvp\dist\rsvp.js:567:5)
    at new Promise (P:\Projects\reproduction-build1\node_modules\rsvp\dist\rsvp.js:1039:33)
    at P:\Projects\reproduction-build1\node_modules\broccoli-persistent-filter\lib\strategies\persistent.js:40:18
    at tryCatch (P:\Projects\reproduction-build1\node_modules\rsvp\dist\rsvp.js:525:12)

The broccoli plugin was instantiated at:
    at BroccoliMergeTrees.Plugin (P:\Projects\reproduction-build1\node_modules\broccoli-plugin\index.js:7:31)
    at new BroccoliMergeTrees (P:\Projects\reproduction-build1\node_modules\ember-cli\node_modules\broccoli-merge-trees\index.js:16:10)
    at Function.BroccoliMergeTrees [as _upstreamMergeTrees] (P:\Projects\reproduction-build1\node_modules\ember-cli\node_modules\broccoli-merge-trees\index.js:10:53)
    at mergeTrees (P:\Projects\reproduction-build1\node_modules\ember-cli\lib\broccoli\merge-trees.js:85:33)
    at EmberApp._mergeTrees (P:\Projects\reproduction-build1\node_modules\ember-cli\lib\broccoli\ember-app.js:1840:12)
    at EmberApp.appAndDependencies (P:\Projects\reproduction-build1\node_modules\ember-cli\lib\broccoli\ember-app.js:1130:51)
    at EmberApp.javascript (P:\Projects\reproduction-build1\node_modules\ember-cli\lib\broccoli\ember-app.js:1253:30)
    at EmberApp.toArray (P:\Projects\reproduction-build1\node_modules\ember-cli\lib\broccoli\ember-app.js:1697:12)
    at EmberApp.toTree (P:\Projects\reproduction-build1\node_modules\ember-cli\lib\broccoli\ember-app.js:1719:38)
    at module.exports (P:\Projects\reproduction-build1\ember-cli-build.js:28:14)

Output from ember version --verbose && npm --version && yarn --version:

ember-cli: 2.15.0-beta.1
http_parser: 2.7.0
node: 6.11.0
v8: 5.1.281.102
uv: 1.11.0
zlib: 1.2.11
ares: 1.10.1-DEV
icu: 58.2
modules: 48
openssl: 1.0.2k
os: win32 x64
npm: 4.6.1
yarn: 0.27.5

ember-cli-babel: 6.6.0
ember-cli-htmlbars: 2.0.2
lolmaus commented 7 years ago

Ran into this when tried installing ember-gestures into ember-toggle. :(

lolmaus commented 7 years ago

Looks like the problem is with this code: https://github.com/html-next/ember-hammertime/blob/master/index.js#L52-L62

eriktrom commented 7 years ago

@lolmaus - Roger that - I'll have to take a look soon, we use this in a few projects. Seems like the AST transform API has a breaking change. Will check ember-source code when I get a chance.

Thanks for bringing this up early.

eriktrom commented 7 years ago

Do u know - does this only occur when installing into an addon or an app as well? Thanks

davidbilling commented 7 years ago

@eriktrom It occurs when installing the addon to an app. It is also in ember-cli 2.15 release version.

davidbilling commented 7 years ago

@rwwagner90 I installed version 1.2.3, but it still has the same issue. Was the fix included there?

RobbieTheWagner commented 7 years ago

It was not. There is currently a PR up with the fix.

RobbieTheWagner commented 7 years ago

Should be fixed in 1.2.4 now!

kitsunde commented 7 years ago

@rwwagner90 I think you might have forgotten to publish to npm.

RobbieTheWagner commented 7 years ago

@kitsunde sorry about that! I don't generally use ember-cli-release, so I thought it had done that for me. Published now.

davidbilling commented 7 years ago

@rwwagner90 Great work! Works now! =)