cacois / flask-angular2-starter

Updated starter app for Flask apps with an Angular2 frontend. Hot module reload, docker support.
20 stars 4 forks source link

Unable to run locally #3

Open lozohcum opened 7 years ago

lozohcum commented 7 years ago

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'

lozohcum commented 7 years ago

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

bsamadi commented 7 years ago

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.