I found myself needing to get the path to the current script and its directory in a local Node JS script recently. In Common JS scripts, that is available by
__dirname globals, but it isn’t available by the same means in ES modules. Instead, there is
import.meta.url, which can be used to get at the directory name if needed, like:
const __filename = import.meta.url.replace(/^file:[\/]+/, '/');
const __dirname = __filename.split('/').slice(0, -1).join('/');
The installation of a new version of nodejs via MacPorts took nearly two hours.
Continue reading post "#3312"
I guess npm doesn’t find a version of a package that matches the current environment when doing
Continue reading post "#3310"
npm install whatever.
GiveCamp is done. It was a success. We finished the chat app for Rubber City Theatre that will be used in live performances starting in June.
Continue reading post "GiveCamp 2018: Final day and end"
Day one of GiveCamp comes to a close. This year I’m working on a project for Rubber City Theatre.
Continue reading post "GiveCamp 2018: Day one"