Open AlphaaBeyy opened 5 years ago
Hi! I'm not any of the developers of this library, but I found the fix for this.
Open terminal wherever you want and do (from the beginning):
npm install webpack webpack-cli -g
git clone https://github.com/paulsonnentag/swip.git && cd swip
npm install
npm install babel-loader@7 babel-core -D
Then modify your webpack.config.js
so that it looks like this:
const path = require('path');
module.exports = {
entry: {
app: './src/client/index.js',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader', // It seems that we need to use babel-loader
},
{
test: /\.css$/,
loader: 'style-loader!css-loader',
},
],
},
};
Now run:
npm run build
cd ./examples/particles && npm install
cd ../golf && npm install
Then you'll be able to do:
npm run golf
// or
npm run particles
It's a shame this project has been abandoned. It would be really interesting to continue development.
Cheers!
@brunodeangelis Thank you very much for your help. I was giving up now I can now try to work on this project
I'am getting errors.
npm run build
swip@0.1.0 build /home/xxx/swip webpack
[webpack-cli] TypeError: ["webpack.config",".webpack/webpack.config",".webpack/webpackfile"].flatMap is not a function
at WebpackCLI.loadConfig (/home/xxx/swip/node_modules/webpack-cli/lib/webpack-cli.js:1505:118)
at WebpackCLI.createCompiler (/home/xxx/swip/node_modules/webpack-cli/lib/webpack-cli.js:1781:33)
at WebpackCLI.runWebpack (/home/xxx/swip/node_modules/webpack-cli/lib/webpack-cli.js:1877:31)
at Command.makeCommand (/home/xxx/swip/node_modules/webpack-cli/lib/webpack-cli.js:944:32)
at Command.listener [as _actionHandler] (/home/xxx/swip/node_modules/commander/lib/command.js:482:17)
at actionResult._chainOrCall (/home/xxx/swip/node_modules/commander/lib/command.js:1283:65)
at Command._chainOrCall (/home/xxx/swip/node_modules/commander/lib/command.js:1177:12)
at Command._parseCommand (/home/xxx/swip/node_modules/commander/lib/command.js:1283:27)
at hookResult._chainOrCall (/home/xxx/swip/node_modules/commander/lib/command.js:1081:27)
at Command._chainOrCall (/home/xxx/swip/node_modules/commander/lib/command.js:1177:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! swip@0.1.0 build: webpack
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the swip@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /home/xxx/.npm/_logs/2024-02-04T13_42_31_850Z-debug.log
I have completed all the stages of the installation. I've tried Windows and Ubuntu, though. the last step is the npm run build process I am experiencing with this error.
Very happy if you help. I like to research such projects and develop myself. I'm a web programming student.