Blaine Simpson
2018-07-02 02:20:10 UTC
I'm new to Node.js. My Node.js installation doesn't support the import
command, but require has been working fine for me so far. But require
isn't working to give me access to the prettyprint
package https://www.npmjs.com/package/prettyprint after I install it with
npm.
Since I can't use require as suggested in the docs, I'm using
const prettyprint = require("prettyprint");
but I get 'TypeError: prettyprint is not a function'. Looking into that, I
see that after the require runs, prettyprint is an object with keys
'createvalueindes' and 'default'. What am I doing wrong?
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/b63d482d-4106-4cd7-8209-aeca8b793f69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
command, but require has been working fine for me so far. But require
isn't working to give me access to the prettyprint
package https://www.npmjs.com/package/prettyprint after I install it with
npm.
Since I can't use require as suggested in the docs, I'm using
const prettyprint = require("prettyprint");
but I get 'TypeError: prettyprint is not a function'. Looking into that, I
see that after the require runs, prettyprint is an object with keys
'createvalueindes' and 'default'. What am I doing wrong?
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/b63d482d-4106-4cd7-8209-aeca8b793f69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.