flask-angular2-starter
flask-angular2-starter copied to clipboard
Unable to run locally
When trying to execute
python manage.py initdb
it returns error:
Traceback (most recent call last): File "manage.py", line 2, in
from flask_app.app import app File "C:\Users\lozohcum\Documents\Projects\flask-angular2-starter\src\server\flask_app_init_.py", line 6, in from .models import Role, User File "C:\Users\lozohcum\Documents\Projects\flask-angular2-starter\src\server\flask_app\models_init_.py", line 2, in from user import User ImportError: No module named 'user'
I had to change all imports to relative and it seems to work now so every from xyz import XYZ changed to from .xyz import XYZ
Thank you @lozohcum . I managed to run the Python server. When I try "npm run server:dev:hmr", I get the following errors on Ubuntu:
ERROR in ./src/vendor.browser.ts Module build failed: TypeError: utils.getOptions is not a function at Object.Angular2HMRLoader (/home/behzad/PycharmProjects/flask-angular2-starter/src/client/node_modules/@angularclass/hmr-loader/index.js:10:21) @ multi vendor
ERROR in ./src/polyfills.browser.ts Module build failed: TypeError: utils.getOptions is not a function at Object.Angular2HMRLoader (/home/behzad/PycharmProjects/flask-angular2-starter/src/client/node_modules/@angularclass/hmr-loader/index.js:10:21) @ multi polyfills
ERROR in ./src/main.browser.ts Module build failed: TypeError: utils.getOptions is not a function at Object.Angular2HMRLoader (/home/behzad/PycharmProjects/flask-angular2-starter/src/client/node_modules/@angularclass/hmr-loader/index.js:10:21) @ multi main
ERROR in this is not a typed array.