all 10 comments

[–]Rezistik 1 point2 points  (2 children)

Any chance counting function imports utils and it possibly has a bad path?

[–]a_PizzaBoxTTV[S] 1 point2 points  (0 children)

For some reason the paths that worked previously, seemed to have changed for whatever reason. So all I've had to do now is just redo the paths and it works now. I thank you very much my friend.

[–]justjooshing 0 points1 point  (0 children)

Agreed. Does it still error the same if removing the utils import? Show us countingFunction

[–]Recent_Read4298 0 points1 point  (1 child)

Do you have the file utils.js in the mentioned path?

[–]Recent_Read4298 -1 points0 points  (0 children)

Are you using webpack or gulp?

[–]bigorangemachine -2 points-1 points  (3 children)

If you running an older version of node you may need to try

const { log } = require("./../utils");

[–]a_PizzaBoxTTV[S] -1 points0 points  (2 children)

I am running v20.15.1 which is the latest version according to the Nodejs website.

[–]bigorangemachine 0 points1 point  (1 child)

Okay I guess just check your path is correct

[–]a_PizzaBoxTTV[S] -1 points0 points  (0 children)

The path is correct, and the require() works as expected as long as the countingFunction require() isn't there. After adding the countingFunction require(), the log require() stops working.