Closed mikkokam closed 9 years ago
The generator doesn't create a src
directory so I'm not sure why you're seeing that. Make sure you've got the latest version installed and try running it in a fresh directory. Also the gulp
task creates the dist
folder and to serve from there you'll want to run gulp serve:dist
. When you run gulp serve
you're serving the app
directory. Typically you'll want to use gulp serve
while you developer and then use gulp
followed by gulp serve:dist
to preview the final before you deploy.
Thanks - I checked on another computer. It did not add the src
directory, thus everything works fine on that one. So, this issue can be closed as this seems to be an issue with my Macbook.
That one remains a mystery - yo polymer
will always create the src
directory and push the bower_components under that.
The difference is, I downloaded the newest Polymer Starter Kit and ran npm install -g gulp bower && npm install && bower install
before installing the generator. Npm had some warnings there, so I should probably clean the installations and npm cache on the Macbook.
Did you run npm install -g generator-polymer? On Aug 6, 2015 2:46 PM, "Mikko Kämäräinen" notifications@github.com wrote:
Thanks - I checked on another computer. It did not add the src directory, thus everything works fine on that one. So, this issue can be closed as this seems to be an issue with my Macbook.
That one remains a mystery - yo polymer will always create the src directory and push the bower_components under that.
The difference is, I downloaded the newest Polymer Starter Kit and ran npm install -g gulp bower && npm install && bower install before installing the generator. Npm had some warnings there, so I should probably clean the installations and npm cache on the Macbook.
— Reply to this email directly or view it on GitHub https://github.com/yeoman/generator-polymer/issues/212#issuecomment-128518826 .
Yes - after PSK.
You shouldn't need to download PSK to use the generator. It spits out a PSK app for you On Aug 6, 2015 9:17 PM, "Mikko Kämäräinen" notifications@github.com wrote:
Yes - after PSK.
— Reply to this email directly or view it on GitHub https://github.com/yeoman/generator-polymer/issues/212#issuecomment-128592722 .
OSX 10.10.3 npm 2.1.18
All OK so far.
Then
And I get:
For all the imports in elements.html.
And I get an empty page, plus bunch of 404's in Chrome console, all like this:
bower_components seems to be under my-project/src Is this intended? It seems to be the thing that breaks everything.
SOLUTION: Option 1 Fixed gulpfile.js -- there are many tasks pointing to bower_component like this:
Replacing _'bowercomponents/ with _'src/bowercomponents/ fixes most, page.js is still not found for gulp (vulcanize task).
Option 2 So, I ended up using a quick fix for now: moving _bowercomponents to the top level, next to _nodemodules, and everything works out OK with no changes anywhere else.