alexa

How to solve "TypeError: process.getuid is not a function" in node js

How to solve "TypeError: process.getuid is not a function" in node js

You can do 3 things to fix that :

1- by change you day to any day excepted Monday Because this function if

  const now = new Date();
if (now.getDay() === MONDAY) {
    const { access, constants, statSync, utimesSync } = require("fs");
    const lastPrint = statSync(openCollectivePath).atime;
    const lastPrintTS = new Date(lastPrint).getTime();
    const timeSinceLastPrint = now.getTime() - lastPrintTS;
    if (timeSinceLastPrint > SIX_DAYS) {
        require(openCollectivePath);
        // On windows we need to manually update the atime
        access(openCollectivePath, constants.W_OK, e => {
            if (!e) utimesSync(openCollectivePath, now, now);
        });
    }
} 

and that about donating to their package

2- remove that condition fileOwnerId === process.getuid()) , but it's Not Working for windows users so you can the last thing

3- add this "webpack-cli": "^3.3.5" to your package.json in dependencies and run npm that working for me.


296 0
7

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online

Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry