Closed kevinthosatria closed 3 years ago
I have made an apidoc.json file in the root directory, but the SyntaxError still persists.
Below is the contents of the apidoc.json file:
{ "backend": { "accessToken": "", "enableWebdav": false, "enableFileDatabase": false, "performance": { "whiteboardInfoBroadcastFreq": 1 } }, "frontend": { "onWhiteboardLoad": { "setReadOnly": false, "displayInfo": false }, "showSmallestScreenIndicator": true, "imageDownloadFormat": "png", "imageURL": "", "drawBackgroundGrid": false, "backgroundGridImage": "bg_grid.png", "performance": { "refreshInfoFreq": 5, "pointerEventsThrottling": [ { "fromUserCount": 0, "minDistDelta": 1, "maxFreq": 30 }, { "fromUserCount": 10, "minDistDelta": 5, "maxFreq": 10 } ] } } }
hey, I tried to reproduce with the exact same version (except ubuntu) and could not reproduce. However, I don't like the # in the variable name so I changed that. Hope this helps. Besides that, I don't know really why you get this error... -.- Please test with this changes. EDIT: You don't need the apidoc.json file to get this working :)
Hi everyone! My name is Kevin, an intern tasked with implementing this library into my team's web application. I am currently running into problems while trying to run the whiteboard application in my local PC.
I am currently using NodeJs v14.17.1 and npm v7.15.1 on Ubuntu 20.04.
I am planning to run the whiteboard application without docker due to my development team's current needs.
After cloning the app locally, running npm ci, and running npm run start:prod, the following error is returned:
Hash: bb4c13a042cca7a1f1b4 Version: webpack 4.46.0 Time: 16244ms Built at: 17/06/2021 10:40:20 am Asset Size Chunks Chunk Names favicon.ico 1.12 KiB [emitted]
images/bg_dots.png 673 bytes [emitted]
images/bg_grid.png 6.81 KiB [emitted]
images/dottedRec.png 222 bytes [emitted]
images/slider-background.svg 1.33 KiB [emitted]
index.html 12.1 KiB [emitted]
main-bb4c13a042cca7a1f1b4.js 720 KiB 0 [emitted] [immutable] [big] main pdf.worker-bb4c13a042cca7a1f1b4.js 644 KiB 1 [emitted] [immutable] [big] pdf.worker Entrypoint main [big] = main-bb4c13a042cca7a1f1b4.js Entrypoint pdf.worker [big] = pdf.worker-bb4c13a042cca7a1f1b4.js [0] ./src/js/whiteboard.js 38.4 KiB {0} [built] [1] ./src/js/services/ConfigService.js + 1 modules 8.59 KiB {0} [built] | ./src/js/services/ConfigService.js 6.29 KiB [built] | ./src/js/services/ConfigService.utils.js 2.29 KiB [built] [2] ./src/js/services/ReadOnlyService.js 3.36 KiB {0} [built] [4] ./src/js/classes/Point.js 4.37 KiB {0} [built] [8] ./src/js/services/InfoService.js 6.11 KiB {0} [built] [9] ./src/js/utils.js 548 bytes {0} [built] [10] ./src/js/shortcutFunctions.js 5.13 KiB {0} [built] [14] (webpack)/buildin/global.js 472 bytes {0} [built] [40] ./src/js/main.js 23.2 KiB {0} [built] [44] ./src/js/keybinds.js 1.35 KiB {0} [built] [45] multi ./src/js/index.js 28 bytes {0} [built] [46] ./src/js/index.js 665 bytes {0} [built] [59] ./src/css/main.css 524 bytes {0} [built] [60] ./node_modules/css-loader/dist/cjs.js!./src/css/main.css 3.89 KiB {0} [built] [90] ./src/js/icons.js + 2 modules 813 KiB {0} [built] | ./src/js/icons.js 710 bytes [built] | + 2 hidden modules
{"message":"Please create an apidoc.json or apidoc.config.js configuration file or add an 'apidoc' key to your package.json.","level":"warn"} { backend: { accessToken: '', enableWebdav: false, enableFileDatabase: false, performance: { whiteboardInfoBroadcastFreq: 1 } }, frontend: { onWhiteboardLoad: { setReadOnly: false, displayInfo: false }, showSmallestScreenIndicator: true, imageDownloadFormat: 'png', imageURL: '', drawBackgroundGrid: false, backgroundGridImage: 'bg_grid.png', performance: { refreshInfoFreq: 5, pointerEventsThrottling: [ { fromUserCount: 0, minDistDelta: 1, maxFreq: 30 }, { fromUserCount: 10, minDistDelta: 5, maxFreq: 10 } ] } } } /home/kevinthosatria/Documents/PortfoPlus/whiteboard/whiteboard/scripts/services/ReadOnlyBackendService.js:9
idToReadOnlyId = new Map();
SyntaxError: Invalid or unexpected token at Module._compile (internal/modules/cjs/loader.js:723:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/home/kevinthosatria/Documents/PortfoPlus/whiteboard/whiteboard/scripts/server-backend.js:4:32)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! whiteboard@1.0.0 start:
apidoc -i scripts/ -o ./dist/apidoc/ && node scripts/server.js --mode=production
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the whiteboard@1.0.0 start 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! /root/.npm/_logs/2021-06-17T02_40_25_084Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! whiteboard@1.0.0 start:prod:
npm run build && npm run start
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the whiteboard@1.0.0 start:prod 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! /root/.npm/_logs/2021-06-17T02_40_25_784Z-debug.log
Any help would be much appreciated! Thanks in advance