0
votes

Question/s

  • How do I update my web-animations-js/ directory (using Bower?) to support <neon-animated-pages>?

  • Do I even need to do this update in the first place?

Background

1. Have verified my imports and confirmed the code works.

In my previous question and answer here, I verified I am using the correct imports for <neon-animated-pages> to work.

2. But I get a console error.

However, now when I use the exact code shown in this JSBin, I get the following console error

Console Error Message
Uncaught TypeError: Cannot read property 'cancel' of null
web-animations-next-animation.js:37

So maybe I don't have all the Bower dependencies installed...

3. Directory contents seem to indicate a missing file.

Checking the contents of my bower_components/web-animations-js/ directory, I see the following file structure.

web-animations-js/ directory file structure
web-animations-js/
  |-- .bower.json
  |-- bower.json
  |-- COPYING
  |-- History.md
  |-- README.md
  |-- web-animations-next-lite.min.js
  |-- web-animations-next-lite.min.js.map
  |-- web-animations-next.min.js
  |-- web-animations-next.min.js.map
  |-- web-animations.html
  |-- web-animations.min.js
  |-- web-animations.min.js.gz
  |-- web-animations.min.js.map

So I think I need to update my web-animations-js/ directory to include the web-animations-next-animation.js file referenced by the console error.

4. So here's what I have tried.

I've tried all the following terminal commands.

Terminal Commands
$ bower update --save web-animations/web-animations-js
$ bower update --save web-animations-js
$ bower install --save web-animations/web-animations-js
$ bower install --save web-animations-js

But I got this response in each case: bower: command not found.

So what should I do next?

2
Is bower installed and on your path? - Ricky

2 Answers

1
votes

The next step, IMHO, is to get a working install of bower in your computer.

If you get bower: command not found responses it can be either because you haven't installed bower or because bower isn't in the path.

To install bower, you need to have npm installed, and then you do the following terminal command:

$ npm install -g bower

(If your npm install is made as root, you could need to be root to execute the precedent command)

That should install bower and put it in the path.

You cans verify bower is installed by executing:

$ bower help

When bower will be installed and working, you can do your bower update command.

0
votes

I re-installed Bower at the root level and downloaded a new version of the Polymer Starter Kit. This seems to have fixed the core problem and <neon-animated-pages> is working.

Note that I first downloaded the PSK without first re-installing Bower and it didn't work because by bower_components directory was omitted from the PSK install. So I had to re-install Bower first. Then it worked fine.