Support node 13
See original GitHub issueWhat is wrong?
Running examples generates a warning, my guess is that node 13 wants to go strict on differentiating cjs and mjs modules.
Terminal dump:
node:37516) Warning: require() of ES modules is not supported.
require() of /Users/vicary/Desktop/node-test/node_modules/brain.js/src/index.js from /Users/vicary/Desktop/node-test/brain.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/vicary/Desktop/node-test/node_modules/brain.js/package.json.
Where does it happen?
Wherever it runs reuqire("brain.js")
How do we replicate the issue?
Just run the examples with the latest node version.
How important is this (1-5)?
4?
Expected behavior (i.e. solution)
No warnings are generated when an example is run.
Other Comments
Falling back to node LTE (12.13.0) removes the warning.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Node.js - endoflife.date
Release Released Active Support
19 2 months and 6 days ago. (18 Oct 2022) Ends in 3 months and 1 week. (01 Apr 2...
18...
Read more >"npm does not support Node.js v13.0.0" · Issue #30066 - GitHub
mgol commented on Oct 22, 2019. I installed Node using nvm if that matters: nvm install 13 ...
Read more >npm does not support Node.js v13.14.0 - Stack Overflow
I try to make upgrade for Last version of the nodejs but I have windows 7 and said me that can not support...
Read more >Node v13.13.0 (Current)
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Read more >Node.js ES2015/ES6, ES2016 and ES2017 support
Yes. Yes Yes. Yes Error. Error Error. Error Error. Error Error. Error
function() function() function() function() function() function()
function() function() function() function() function() function()
function() function()...
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
Updated to support node 13, should be working fine now: https://github.com/BrainJS/brain.js/commit/c85cc6a7fad3d79b259bfc9f3c5cf770d28e40da
Latest alpha versions have this option fixed.