I got an error when running "npm run helper:add"
elharony opened this issue · comments
Hey,
I liked the idea behind tiny-helpers
, and I wanted to submit one of my tools. After installing npm ci
, and running npm run helper:add
, I get the following error:
TypeError: Cannot destructure property `writeFile` of 'undefined' or 'null'.
at Object.<anonymous> (C:\OS\tiny-helpers\scripts\add-helper.js:2:36)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tiny-helpers@1.0.0 helper:add: `node ./scripts/add-helper.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tiny-helpers@1.0.0 helper:add script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\pyahy\AppData\Roaming\npm-cache\_logs\2020-01-17T03_43_22_176Z-debug.log
System Info
- OS: Windows 10 Pro
Thanks for filing this issue. It looks like you're running on a Node.js version that does not support fs.promises yet. I added notes about the recommended Node.js version and also added an .nvmrc
file.
For now, I'd at least recommend v12.14
which is the current LTS. :)
Could you confirm and tell me your node version?
I'm closing for now, but I'm very happy to discuss this further if the problem is not the node version. :)
Thanks for your reply @stefanjudis . Yeah, I am actually running a Legacy Node Version (v8.12.0
) 😄
Your explanation under the Contributing
section is perfect for anyone who might be facing a similar issue 👍