Closed qichaotang closed 8 years ago
I am also running into this exact same issue. I tried copying the files that got installed by Bower into bower_components
into the static/js
folder, then changed over to:
ui.render_layout(app, "./static/js/layout.js")
...but had no luck.
More broadly, the "Basic" example is basic in its explanation but it is pretty hard to follow if you're new to the whole of Pyxley's dependencies. It really assumes that the reader knows a lot about the other environments before it actually feels basic.
FWIW - here are other examples I had to figure out:
bower.json
for the basic project I am building?package.json
for the basic project I am building?Here's what I ended up going with:
bower.json
{
"name": "test_ui",
"authors": [
"Brett Francis"
],
"description": "the first research UI",
"main": "",
"moduleType": [
"node"
],
"keywords": [
"research"
],
"license": "Commercial",
"homepage": "",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"bootstrap": "~3.3.4",
"react": "~0.13.1",
"classnames": "~2.1.1",
"d3": "~3.5.5",
"nvd3": "~1.7.1",
"react-bootstrap": "~0.22.6",
"jquery": "~2.1.3",
"datatables": "~1.10.6",
"datamaps": "~0.4.0",
"metrics-graphics": "~2.5.0",
"pyxley": "~0.0.3"
},
"resolutions": {
"d3": "~3.5.5"
}
}
package.json
{
"name": "test_ui",
"version": "0.0.1",
"description": "the first research UI",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"research"
],
"author": "Brett Francis",
"license": "Commercial"
}
layout.js is actually generated on the fly by the code during startup based on the following code in app.py:
sb = ui.render_layout(app, "./static/layout.js")
sb = ui.render_layout(app, "./static/layout.js") I can't find ./static/layout.js,the file always make the error.What should be done to make it.