[GH-ISSUE #55] Error: Unexpected token in storage-acebase.js #41

Closed
opened 2026-05-23 08:27:41 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @holeq on GitHub (Dec 23, 2021).
Original GitHub issue: https://github.com/appy-one/acebase/issues/55

Hello. I faced the problem in version 1.12.3.
Node v13.10.1 on Windows 10

...\node_modules\acebase\src\storage-acebase.js:979
if (this.settings.transactions?.log !== true) { throw new Error('Transaction logging is not enabled'); }
^

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:1063:16)
at Module._compile (internal/modules/cjs/loader.js:1111:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (D:\PROJECTS\njs-querize\node_modules\acebase\src\api-local.js:3:52)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)

Originally created by @holeq on GitHub (Dec 23, 2021). Original GitHub issue: https://github.com/appy-one/acebase/issues/55 Hello. I faced the problem in version 1.12.3. Node v13.10.1 on Windows 10 ...\node_modules\acebase\src\storage-acebase.js:979 if (this.settings.transactions?.log !== true) { throw new Error('Transaction logging is not enabled'); } ^ SyntaxError: Unexpected token '.' at wrapSafe (internal/modules/cjs/loader.js:1063:16) at Module._compile (internal/modules/cjs/loader.js:1111:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10) at Module.load (internal/modules/cjs/loader.js:996:32) at Function.Module._load (internal/modules/cjs/loader.js:896:14) at Module.require (internal/modules/cjs/loader.js:1036:19) at require (internal/modules/cjs/helpers.js:72:18) at Object.<anonymous> (D:\PROJECTS\njs-querize\node_modules\acebase\src\api-local.js:3:52) at Module._compile (internal/modules/cjs/loader.js:1147:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
Author
Owner

@appy-one commented on GitHub (Dec 23, 2021):

The optional chaining operator ?. is supported by Node.js 14+. If you can update, do that. I will change the code to be backward compatible with older Node.js versions again but updating is your quickest solution for now

<!-- gh-comment-id:1000131485 --> @appy-one commented on GitHub (Dec 23, 2021): The optional chaining operator `?.` is supported by Node.js 14+. If you can update, do that. I will change the code to be backward compatible with older Node.js versions again but updating is your quickest solution for now
Author
Owner

@holeq commented on GitHub (Dec 23, 2021):

I hear you. Thank you.

<!-- gh-comment-id:1000143380 --> @holeq commented on GitHub (Dec 23, 2021): I hear you. Thank you.
Author
Owner

@appy-one commented on GitHub (Dec 23, 2021):

I published the fix for this in acebase v1.12.4

<!-- gh-comment-id:1000165367 --> @appy-one commented on GitHub (Dec 23, 2021): I published the fix for this in acebase v1.12.4
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#41
No description provided.