Specify required nodejs version
See original GitHub issueWhen running the echo.js
demo I got the following exception
$ nodejs echo.js localhost 25565
.../node_modules/minecraft-protocol/dist/transforms/framing.js:112
} else throw e;
^
TypeError: Object REGISTER,UNREGISTER,MC|TrSel,MC|TrList has no method 'find'
at Client.onCustomPayload (.../node_modules/minecraft-protocol/dist/client/pluginChannels.js:45:28)
at Client.EventEmitter.emit (events.js:98:17)
at Parser.<anonymous> (.../node_modules/minecraft-protocol/dist/client.js:101:16)
at Parser.EventEmitter.emit (events.js:95:17)
at readableAddChunk (.../node_modules/protodef/node_modules/readable-stream/lib/_stream_readable.js:217:18)
at Parser.Readable.push (.../node_modules/protodef/node_modules/readable-stream/lib/_stream_readable.js:176:10)
at Parser.Transform.push (.../node_modules/protodef/node_modules/readable-stream/lib/_stream_transform.js:123:32)
at Parser._transform (.../node_modules/protodef/dist/serializer.js:88:14)
at Parser.Transform._read (.../node_modules/protodef/node_modules/readable-stream/lib/_stream_transform.js:159:10)
at Parser.Transform._write (.../node_modules/protodef/node_modules/readable-stream/lib/_stream_transform.js:147:83)
The code in question calls find
on an channels
which happens to be an array. Thus the desired function is Array.prototype.find, not available in my nodejs version.
Updating nodejs did solve the problem:
- Version not working: v0.10.25
- Version working: v4.2.6
Please specify the required nodejs version or use an ES6 shim in order to avoid such confusion 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
How can I specify the required Node.js version in package.json?
I have a Node.js project that requires Node version 12 or higher. Is there a way to specify this in the packages.json file,...
Read more >How to define the required Node.js version in package.json?
To define the required Node.js version in the package.json file we will have to go through few simple steps:.
Read more >Specifying a required Node.js version in Package.json file
Specifying the Node version · Open the node project in your favorite code editor. · Navigate to the package.json file and add the...
Read more >How to check minimum required Node.Js version - Medium
For many apps may be useful to check the Node. Js engine version and require specific version. We can use “engines” section in...
Read more >How to specify the required Node.js and npm version in ...
In this tutorial we will learn how to lock the required Nodejs and npm version or rather specify the Nodejs and npm version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently, the tests are being run on nodejs 4 according to circle.yml.
I guess we could set engine-strict to whatever is the lowest we have in circle.yml.
the way we specify it is the correct way (https://docs.npmjs.com/files/package.json#engines) engineStrict is depreciated since npm 3