Node, 5.1.18-prerelease: TypeError: Buffer.alloc is not a function

307 views
Skip to first unread message

Alex Hough

unread,
Jul 5, 2018, 3:24:04 AM7/5/18
to TiddlyWiki
@jeremy,

Is this the best place to post the below?
I have updated TW on node

users-mbp-2:TW-Node alexhough$ tiddlywiki --version

5.1.18-prerelease


Then I tried

users-mbp-2:TW-Node alexhough$ tiddlywiki mynewwiki --init server


The output was

$:/core/modules/utils/filesystem.js:60

fileBuffer = Buffer.alloc(FILE_BUFFER_LENGTH);

                    ^

TypeError: Buffer.alloc is not a function

    at exports.copyFile ($:/core/modules/utils/filesystem.js:60:23)

    at copy ($:/core/modules/utils/filesystem.js:35:14)

    at copy ($:/core/modules/utils/filesystem.js:40:12)

    at exports.copyDirectory ($:/core/modules/utils/filesystem.js:47:2)

    at Command.execute ($:/core/modules/commands/init.js:42:23)

    at Commander.executeNextCommand ($:/core/modules/commander.js:100:14)

    at Commander.execute ($:/core/modules/commander.js:64:7)

    at Object.exports.startup ($:/core/modules/startup/commands.js:34:12)

    at $tw.boot.executeNextStartupTask (/Users/alexhough/TiddlyWiki5-master/boot/boot.js:2113:10)

    at $tw.boot.executeNextStartupTask (/Users/alexhough/TiddlyWiki5-master/boot/boot.js:2111:21)

users-mbp-2:TW-Node alexhough$



The new material on the pre-release looks very interesting, I have a new project and want to start with state of the art TW...

best wishes


Alex

TonyM

unread,
Jul 5, 2018, 4:32:43 AM7/5/18
to TiddlyWiki
Alex,

It may be best for pre-release feedback to be placed in the TiddlyWikiDev group.

Far be it me to tell you what to do but unless you need a feature in an impending release N-1 is the best, or the latest public release (older than a few weeks), especially when the next one foreshadowed is but an incremental release.

I say this based on the reliability of tiddlywiki upgrades and the likelyhood that undetected errors will be fixed soon after a release. TiddlyWiki 5.1.16 was quickly followed by 6.1.17 If you install the 5.1.18 pre-lrelease you may find along comes 5.1.19 quickly followed by 5.1.20 and their is less gaurentee of an effective upgrade from the pre-release. In effect you may find yourself 3 versions behind in a tick

Yes, install it along side your working one, yes please provide feedback, as you are doing, but consider avoiding using it in "production".

Best wishes
Tony

Jed Carty

unread,
Jul 5, 2018, 5:19:37 AM7/5/18
to TiddlyWiki
I think there were some changes to the Buffer module but that was a while ago. Are you using an older version of node? You can tell by opening a terminal and typing 'node -v'. If you have a version older than 6 you should probably consider updating.

Alex Hough

unread,
Jul 5, 2018, 7:13:38 AM7/5/18
to TiddlyWiki

thanks Jed and Tony,

I like using the latest version, and want to help iron out problems.

I'm pretty certain I'm running an old version of node, thanks Jed! 

Alex

On 5 July 2018 at 10:19, Jed Carty <inmy...@gmail.com> wrote:
I think there were some changes to the Buffer module but that was a while ago. Are you using an older version of node? You can tell by opening a terminal and typing 'node -v'. If you have a version older than 6 you should probably consider updating.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9be6f6c3-dd7e-4ad9-bc34-7bc5464039b8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Alex Hough

unread,
Jul 6, 2018, 1:37:54 AM7/6/18
to TiddlyWiki
UPDATE

The listen command still doesn't work, server does though. 

ast login: Fri Jul  6 06:19:08 on ttys003

users-mbp-2:~ alexhough$ node -v

v8.11.3

users-mbp-2:~ alexhough$ TiddlyWiki --version

5.1.18-prerelease

users-mbp-2:~ alexhough$ tiddlywiki mynewwiki --listen

Error: Unknown command: listen

users-mbp-2:~ alexhough$ tiddlywiki mynewwiki --server

Serving on 127.0.0.1:8080


maybe the docs are ahead of the code in this instance

Alex

Jeremy Ruston

unread,
Jul 6, 2018, 2:24:29 AM7/6/18
to tiddl...@googlegroups.com
Hi Alex

Did you definitely download the new branch, rather than the default master branch? Check my original post for links

Best wishes

Jeremy

--
Jeremy Ruston

To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Alex Hough

unread,
Jul 6, 2018, 8:57:14 AM7/6/18
to TiddlyWiki
Hi Jeremy,

I followed the documentation on installing pre-release on node.

I updated node following Jed's recommendation. 

its working perfectly... 

The new custom styles are amazing btw

Alex


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Jeremy Ruston

unread,
Jul 7, 2018, 7:26:27 AM7/7/18
to tiddl...@googlegroups.com
Hi Alex

I followed the documentation on installing pre-release on node.

OK, the difference here is that the new code is in a different branch, so you'll need to download it from this URL, rather than the one in the instructions:


Best wishes

Jeremy

To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Alex Hough

unread,
Jul 10, 2018, 4:28:28 AM7/10/18
to TiddlyWiki
Thanks Jeremy,

I'll give it a go...

Alex

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
Reply all
Reply to author
Forward
0 new messages