Staffjoy / suite

Staffjoy V1, aka "Suite" - a scheduling application for hundreds of workers
https://www.staffjoy.com
Other
842 stars 231 forks source link

First time "make dev" results in [db-deploy] Error 1 #49

Open MichaelDao opened 5 years ago

MichaelDao commented 5 years ago

Hello friends, I am trying to figure out how to get this project running locally on my machine, It seems to stop working after i have installed all dependencies with the "make dev" command.

File "main.py", line 9, in <module>
    from app.models import *
  File "/vagrant/app/models/__init__.py", line 16, in <module>
    exec ("from %s import %s" % (module, classname)) # pylint: disable=exec-used
  File "<string>", line 1, in <module>
  File "/vagrant/app/models/schedule2_model.py", line 11, in <module>
    import recurring_shift_model  # pylint: disable=relative-import
  File "/vagrant/app/models/recurring_shift_model.py", line 12, in <module>
    import organization_model  # pylint: disable=relative-import
  File "/vagrant/app/models/organization_model.py", line 10, in <module>
    import user_model  # pylint: disable=relative-import
  File "/vagrant/app/models/user_model.py", line 21, in <module>
    from app.email import send_email
  File "/vagrant/app/email.py", line 5, in <module>
    celery = create_celery_app()
  File "/vagrant/app/__init__.py", line 49, in create_celery_app
    os.environ.get("ENV", "prod"), register_blueprints=False)
  File "/vagrant/app/__init__.py", line 135, in create_app
    css_blog.build()
  File "/vagrant/vagrant-venv/local/lib/python2.7/site-packages/webassets/bundle.py", line 663, in build
    disable_cache=disable_cache))
  File "/vagrant/vagrant-venv/local/lib/python2.7/site-packages/webassets/bundle.py", line 600, in _build
    force, disable_cache=disable_cache, extra_filters=extra_filters)
  File "/vagrant/vagrant-venv/local/lib/python2.7/site-packages/webassets/bundle.py", line 524, in _merge_and_apply
    kwargs=item_data)
  File "/vagrant/vagrant-venv/local/lib/python2.7/site-packages/webassets/merge.py", line 276, in apply
    return self._wrap_cache(key, func)
  File "/vagrant/vagrant-venv/local/lib/python2.7/site-packages/webassets/merge.py", line 218, in _wrap_cache
    content = func().getvalue()
  File "/vagrant/vagrant-venv/local/lib/python2.7/site-packages/webassets/merge.py", line 251, in func
    getattr(filter, type)(data, out, **kwargs_final)
  File "/vagrant/vagrant-venv/local/lib/python2.7/site-packages/webassets/filter/less.py", line 139, in input
    self._apply_less(_in, out, source_path)
  File "/vagrant/vagrant-venv/local/lib/python2.7/site-packages/webassets/filter/less.py", line 131, in _apply_less
    self.subprocess(args, out, in_)
  File "/vagrant/vagrant-venv/local/lib/python2.7/site-packages/webassets/filter/__init__.py", line 523, in subprocess
    proc.returncode, stdout, stderr))
webassets.exceptions.FilterError: less: subprocess returned a non-success result code: 1, stdout=, stderr=[TypeError: Object function Object() { [native code] } has no method 'assign']

make: *** [db-deploy] Error 1

I am not too sure what this error is exactly coming from, I feel like I am missing a vital dependency to get this project working. Any help would be appreciated!

lytrungtin commented 5 years ago

Install nodejs in Vagrant fix for me.

philipithomas commented 5 years ago

The dev environment was hacked-together, and is in need of a complete rewrite :-(

I'm no longer maintaining the Staffjoy code. But, I'm leaving this issue open in case the community can help. (Thanks @trungtinhandsome!)

startupskateboard commented 5 years ago

@trungtinhandsome node seems to be already installed in the vagrant? can you please lemme know how you installed it differently? I keep getting the same issue.

lytrungtin commented 5 years ago

@iamtheword Sorry because I am not clear in last comment. It is running an old version of node.js (verify with node -v, at the time of writing this, the latest lts is 6.x). Please follow this:

Step 1, remove the old packages: sudo apt-get remove --purge nodejs

Step 2, type the following commands one after the other and follow the screen: curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install -y nodejs

startupskateboard commented 5 years ago

I just upgraded it and it worked, thank you so much!! :)