Require(...) is not a function
RolphH opened this issue · 2 comments
RolphH commented
When (as documented) running ./node_modules/.bin/snippet-enricher-cli --input=....
there is an error:
require('./../index.js')(); ^ TypeError: require(...) is not a function
Removing the () from the require fixed this issue.
thblckjkr commented
I have the same problem, to solve it i tried to use any of the older versions (0.3 - 0.5) and it didn't work.
I guess has something to do with my node version v14.3.0
but i am not really sure.
I solved it with a script in my project repo, containing the following code, to solve the problem without modifying the code in node_modules
#!/usr/bin/env node
require('../node_modules/snippet-enricher-cli/index');