flask-angular2-starter icon indicating copy to clipboard operation
flask-angular2-starter copied to clipboard

Unable to run locally

Open lozohcum opened this issue 7 years ago • 2 comments

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 avatar Aug 15 '17 09:08 lozohcum

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

lozohcum avatar Aug 15 '17 09:08 lozohcum

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.

bsamadi avatar Sep 18 '17 01:09 bsamadi