designer
designer copied to clipboard
build.sh does not work in Windows
Tried setting this up. Started with:
- bower install
- npm install
- npm run-script build (produces error):
Noticed I didn't have browserify installed so I installed with: npm install browserify -g
Running: npm run-script build still didn't work. Notice the error: '.' is not recognized as an internal or external command...... So I edited the package.json file. Here's a shot of the edited file which worked:
Now I could run: npm run-script build successfully after which i run npm start:
However nothing loads at localhost:8080. And its running on Chrome Canary. Console error attached:
Can't seem to figure out the problem.
See https://github.com/Polymer/designer/issues/100#issuecomment-88652515 for a workaround for the redirect issue on windows.
The link https://github.com/PolymerLabs/polyserve/blob/master/src/server.js#L42 doesn't exist.
Also the code you reference seems to have been replaced:
var splitPath = url.pathname.split(path.sep).slice(1);
It seems to be now in line https://github.com/PolymerLabs/polyserve/blob/master/src/make_app.js#L37 - which was not changed. On Windows path.sep == "" - so I think the corrected line should be
var splitPath = url.pathname.split("/").slice(1);
Hmmm, this is strange. I changed the line like you suggested. Still didn't work. Also noticed this line https://github.com/PolymerLabs/polyserve/blob/master/src/make_app.js#L41 which i changed to var filePath = splitPath.join("/");
Still no joy. Wondering what could be wrong...
I have same problem as original post....
I'll get the changes that should fix Windows in soon, and I'm also setting up a Windows VM to test the build/install process.
Just a note on my issue/setup....
I am on Windows 8.1 (clean install) used GIT from here (MUST use command line option): http://git-scm.com/download/win used NodeJS from here: https://nodejs.org/ installed browserify : npm install browserify -g
I think a lot of people are cloning/using main branch (like I did) which is a mistake! The active branch they really want is "designer2" To do that you MUST do it this way! git clone -b designer2 https://github.com/Polymer/designer.git (please confirm this)
in package.json, line #12 must be modified from "build": "./build.sh" to this "build": "build.sh"
I then did npm start inside the main polmer folder... Note that it serves components out of "bower_components" Which is fine except the html inside that folder uses "components" folder. I also noticed the html for polymer components referencing folders that were NOT in the correct locations. So the folder referencing and or folder locations were all messed up.
The designer2
branch isn't necessary, it was just old, so I deleted it. The polyserve fix for path separators has been in, so things should work now. I still don't have the VM setup, so reports of success or failure are greatly appreciated! :)
bower install
prompted for a lot of conflicts - maybe I selected the wrong version for a component:
"resolutions": {
"iron-flex-layout": "master",
"iron-iconset-svg": "master",
"iron-selector": "master",
"paper-ripple": "master",
"polymer": "v0.8.0-rc.7",
"webcomponentsjs": "master"
}
I get now the following error
I think you need to npm update && npm run-script build
I think I did that (npm run-script build still fails) so I executed the command one by one.
polymer-designer-demos doesn't exist in my bower_components folder. If I create that folder the error messages are not showing any longer, but I'm not sure if the resulting page is correct. Can't seem to find a way to create/edit a component:
Ahh... I need to add another step to the instructions, which is to run bower install
in the demo
directory
Done - but the designer looks unchanged (like above)
That's the contents of my demo directory:
There's no file list in the nav drawer? Are you still getting 404's in the console?
After stopping and starting again npm start
the designer looks a little different, but still can't figure out how to use it:
After I have created an empty \bower_components\polymer-designer-demos the errors in the console are gone. Should there be an content in polymer-designer-demos?
bower install in the demo directory created a demo\bower_components folder in demo, but did not create \bower_components\polymer-designer-demos
When clicking on the folder icon I get
Did you click the expander? There should be 7 or so demos in there.
"bower install prompted for a lot of conflicts - maybe I selected the wrong version for a component:"
I also got this problem, where as before I didn't.
I clicked it - but I've created the polymer-designer-demos folder, as it was missing. So it's currently empty. In which repo do I find the content for that folder?
You don't need to create a polymer-designer-demos
folder. That's served up to the browser by polyserve
. Are you sure you have the latest polyserve (0.4.0)?
How do I check the version? That's what I see when I start it
$ npm start
> [email protected] start c:\dev\designer2
> node server.js
Starting Polymer Designer Server on port 8080
\node_modules\polyserve\package.json shows version 0.4.0, so I assume I have that latest version
what about when you ls demo
?
Pls see above - I've already provided a screenshot.
If I copy the *.html files from demo to bower_components\polymer-designer-demos the they are served.
that shouldn't be necessary
which bower_components/
? designer/bower_components/
or designer/demo/bower_components/
The files are delivered from designer\bower_components\polymer-designer-demos
@MartinOrtiz the conflicts are somewhat expected for now, elements are shifting around a lot. I'll try to get it sorted soon, but it shouldn't matter much.