Bassa
Bassa copied to clipboard
Suggestion: Migrate to newer technologies
Expected Behavior
Smooth installation process without any dependency hassle. Setting up the project should require minimal steps.
Current Behavior
While setting up Bassa recently on my machine, I came across a couple of serious issues.
-
First and foremost, the
README.md
is missing the commandpip3 install -r requirements.txt
. For someone new to python, this might be a problem. -
mysqlclient
is a problematic package, with reduced support each passing day. Installing the 1.3.7 version required for Bassa leads to the following error:
This is a missing header file in the mysqlclient-c
dependency of the library. After looking through a bunch of resources, I tried the following -
- Installing
mysqlclient=1.3.12
- Referring to this link and running
env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip3 install mysqlclient==1.3.12
Both of these result in no luck, with installation ending with a fail in building the mysqlclient wheel:
The package works fine though, with the database being set up without any problems and the data being fetched and save properly. The problem lies in the fact that there is limited support now, and I imagine even less in the future.
-
bower
has become really old and obsolete now. NPM itself warns us
-
gulp
behaves unexpectedly. Installing without sudo just doesn't work at all. And installing with sudo but without homebrew doesn't work either. I tried multiple times, read multiple stack overflow solutions, nothing.sudo gulp serve
WILL NOT work if installed via NPM.gulp serve
wont work either way. Same goes for bower. They will ONLY work if:
brew install gulp -g
brew install bower -g
- See how gulp just wont work. It has become rebellious :
Also, gulp
commands refuse to work on my environment as it is. I have to add an npm script in package.json
, "start": "gulp serve"
to make it work. No idea why. Sometimes, it does work with gulp serve
though.
gulp-sass
does wonders sometimes too. Even though present and installed, it ocassionally says 'cannot find module gulp-sass'. Which then has to be rectified by running npm update
or sometimes by reinstalling dependencies.
-
node-sass
poses issues as well. Certain versions of it (I think below 3.9.0) are not compatible fully. Although Bassa doesn't use that version, still you cn find errors where it refuses to build and hence breaks the gulp tasks.sudo npm rebuild nose-sass
has to be run to fix the problem, though not to full guarentee. The project can probably do away with it.
Here is an article directly from their maintainer about 2 years ago, acknowledging breaks.
Possible Solution
I can only see long-term solutions to this. Moving the database to postgres
and the frontend to a more potent library like angular4
or in my opinion, react
. Reason being, the create-react-app
comes bundled with webpack by default, and hence its beautiful. Minifying happens automatically and we don't have to worry about the JS or CSS compiling. The database being shifted to postgres
is mainly because of extensive support and regular maintainance. It is frequently used as an SQL database, and hence has plenty support.
Also, consider migrating to yarn. It is way better than the newer npm versions. node-gyp
is a pain in the ass most of the time.
Steps to Reproduce (for bugs)
Not sure if it's just me, but try to set up the project from scratch on the exact environment as listed below. Follow the Wiki for macOS installation.
Environment
- Environment name and version (e.g. Chrome 39, node.js 5.4): Node version ~8.12.0
- Operating System and version (desktop or mobile): MacBook Air, OSX 10.13.6
Unable to start the project altogether now. Was not facing this issue earlier.
Related issues:
https://github.com/gulpjs/gulp/issues/2162 https://github.com/nodejs/node/issues/19786 https://github.com/gulpjs/gulp/issues/2146
Seems to be a problem with the gulp version.
UPDATE
This issue will hit you if you use Node.js version ^10
@VibhorCodecianGupta - @agentmilindu was thinking to shift from bower and gulp to webpack so that will reduce this error.
I have also faced a lot of errors with node sass
so workaround can replace it will something else.
I haven't faced any problem with MySQLdb and libmysqlclient till the date but I guess it' making problem on Macbooks.
We can have a good discussion about upgrading our techs.
@vivonk absolutely. React with webpack
and babel
plugins is the brightest future for Bassa in my opinion.
@VibhorCodecianGupta I guess shifting from angularjs to React might not be a right decision at this stage. Alternatively, we can have a branch where we can work on this. @agentmilindu @rehrumesh can provide better insights into this :smile:
Yes, sure. It can be initiated as a different release altogether, in a separate branch. If it's convincing enough to replace the current architecture, only then it could be considered to go ahead. On the other hand, we could also discuss migrating to Angular2/Angular4 instead of React.
@vivonk Do we have a new branch for migrating?