6

I'm getting this error

ERROR in ./bower_components/velocity/velocity.js
Module build failed: TypeError: /Users/dave/project/bower_components/velocity/velocity.js: Cannot read property 'length' of undefined

(note: the error is much longer with all kinds of babel-core errors, but I'm assuming that it's because something isn't loading correctly with Velocity)

My Webpack alias:

 Velocity: resolveBowerPath('/velocity/velocity.js')

My javascript import:

 import Velocity from 'Velocity';

When I nano that path (/Users/dave/project/bower_components/velocity/velocity.js) in terminal, the file comes up fine so it's not a bad import URL, and I'm able to import other Bower projects fine, this has been the only one that won't load. Is there something I'm doing wrong?

Note: I'm getting the very same error when I try to shim Velocity with webpack.ProvidePlugin() so I'm thinking it's not an issue with webpack...

dave
  • 2,162
  • 4
  • 22
  • 20
  • Did you ever find a solution? I can't seem to get Velocity working with ES6/Webpack either :/ – Caelum Feb 16 '17 at 13:24
  • It's been awhile, but I think I ended up going with another project instead of Velocity. I'm pretty sure I put a ticket on their repo and never heard back from it, which always leaves a bad taste in my mouth regarding a project's support/health. – dave Feb 22 '17 at 07:23
  • 1
    Ah, well I'll look for an alternative. Thanks for letting me know :) for what it's worth to you or google searchers, my particular reason (for now) to have Velocity is satisfied by https://www.npmjs.com/package/react-animate-on-change – Caelum Feb 22 '17 at 15:47

0 Answers0