keindev / stdout-update Goto Github PK
View Code? Open in Web Editor NEWPurely and accurately overwrites the previous output in the terminal, while maintaining the history of third-party logs
License: MIT License
Purely and accurately overwrites the previous output in the terminal, while maintaining the history of third-party logs
License: MIT License
On version 1.6.6 the Node engine was changed as documented on the release page:
Bumped node from 12.0.0 to 14.0.0
I would consider that a Major release change, as this sort of change does have breaking changes on deployment using traditional ^ updates.
Please consider updating that engine update to version ^2.. and release another version 1.6.8 with version 12.0.0 for Node engine.
Hello @keindev,
Thank you for this well-organized library, is it possible/do you find it reasonable to expose the clear
method, so that we can clear the output from outside, because with update
method checks the length of the array so that we can not pass an empty array.
I'm not able to import the package on my project. Node.js returns this problem:
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/project/node_modules/stdout-update/lib/UpdateManager' imported from /project/node_modules/stdout-update/lib/index.js
at new NodeError (internal/errors.js:322:7)
at finalizeResolution (internal/modules/esm/resolve.js:308:11)
at moduleResolve (internal/modules/esm/resolve.js:731:10)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:842:11)
at Loader.resolve (internal/modules/esm/loader.js:89:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)
at link (internal/modules/esm/module_job.js:75:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
That's my package.json:
{
"name": "project",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"type": "module",
"scripts": {
"start": "node src/index.js"
},
"dependencies": {
"stdout-update": "^3.0.5"
}
}
and on my JS file, I'm importing it like that:
import UpdateManager from 'stdout-update';
const manager = UpdateManager.getInstance();
A quick fix was to change the JS files inside the node_modules/stdout-update/lib folder to import the files with a .js
at the end, like this:
// lib/index.js
- export { default } from './UpdateManager';
+ export { default } from './UpdateManager.js';
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.