Articles Hierarchy

Articles Home » RPI » RPI_p5js editor on local server

RPI_p5js editor on local server

i read about the idea to have also the p5.js editor installed.
p5.js-web-editor-master.zip from
git
follow this? or
unzip to a new project on RPI
npm install

now about mongodb ( does not work )
sudo apt-get install mongodb

cat /sys/kernel/mm/transparent_hugepage/enabled
echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled
cat /sys/kernel/mm/transparent_hugepage/enabled
echo 'never' > /sys/kernel/mm/transparent_hugepage/defrag
cat /sys/kernel/mm/transparent_hugepage/defrag

touch /tmp/theswap
chmod 600 /tmp/theswap
dd if=/dev/zero of=/tmp/theswap bs=1M count=2048
mkswap /tmp/theswap
swapon /tmp/theswap

You can now start-up MongoDB:

sudo service mongodb start
sudo service mongodb status


cp .env.example .env
nano .env
no idea there

npm run fetch-examples
npm run build

pi@RPI:~/projects/editor.p5js/p5.js-web-editor $ npm run build

> p5.js-web-editor@0.0.1 build /home/pi/projects/editor.p5js/p5.js-web-editor
> npm run build:client && npm run build:server && npm run build:examples


> p5.js-web-editor@0.0.1 build:client /home/pi/projects/editor.p5js/p5.js-web-editor
> cross-env NODE_ENV=production webpack --config webpack/config.prod.js


<--- Last few GCs --->

[1103:0x25c6a20] 149483 ms: Mark-sweep 215.2 (218.9) -> 214.8 (218.9) MB, 687.2 / 0.0 ms (average mu = 0.215, current mu = 0.182) allocation failure scavenge might not succeed
[1103:0x25c6a20] 150308 ms: Mark-sweep 215.3 (218.9) -> 214.8 (218.9) MB, 801.7 / 0.0 ms (average mu = 0.127, current mu = 0.028) allocation failure scavenge might not succeed


<--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 0xe4b660]
Security context: 0x5294e225
1: /* anonymous */ [0x6f34a6f9] [/home/pi/projects/editor.p5js/p5.js-web-editor/node_modules/terser/dist/bundle.min.js:~1] [pc=0x527dbfa0](this=0x6f34a719 ,0x268cf48d ,0x5e87de6d )
2: _visit [0x57b46b2d] [/home/pi/projects/editor.p5js/p5.js-web-editor/node_modules/terser/dist...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Writing Node.js report to file: report.20191006.134800.1103.0.001.json
Node.js report completed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! p5.js-web-editor@0.0.1 build:client: `cross-env NODE_ENV=production webpack --config webpack/config.prod.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the p5.js-web-editor@0.0.1 build:client 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/pi/.npm/_logs/2019-10-06T06_48_01_108Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! p5.js-web-editor@0.0.1 build: `npm run build:client && npm run build:server && npm run build:examples`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the p5.js-web-editor@0.0.1 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/pi/.npm/_logs/2019-10-06T06_48_01_233Z-debug.log
pi@RPI:~/projects/editor.p5js/p5.js-web-editor $

____________
should have been final step:
npm run start:prod