This repo is used to build and host the website of Prossima Dev, which belongs to the Prossima Suite.
Prossima Dev website is built using React Framework.
Open a terminal and clone the repository:
git clone https://github.com/Prossima-Art/prossima-devMake sure you have installed the Git tool.
Then navigate to the new folder:
cd prossima-devand install all dependencies:
npm installthen run it:
npm startMake sure that you have already installed the node.js. Finally, open the browser at http://localhost:3000/ for visualizing the website.
The package mysql2 is required to make CRUD operations and has to be installed:
npm install mysql2and inserted in the code as:
import mysql from 'mysql2/promise'but it has a lot of issues. This is because versions of webpack>5 doesnt include polyfill by default. This guys here relate quite well the issue and manage to resolve it.
However, we took an alternative way that consists in making the following steps:
- In case they did not come preinstalled, install browserify and crypto-browserify. More info here
npm install browserify crypto-browserify- Modify the webpack.config.js inside node_modules/react-scripts/config/. More info here
resolve: {
fallback: {
crypto: require.resolve("crypto-browserify"),
}
}- Install the rest of modules (stream, timers, zlib, net, tls):
npm install stream timers zlib net tls- In case the errors persits, they might be related to the zlib packages. (Can't resolve './zlib_bindings'). In that case, remove zlib package, and
- Modify again webpack.config.js inside node_modules/react-scripts/config/
resolve: {
fallback: {
zlib: require.resolve("browserify-zlib"),
}
}