We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With Node.js 14 invoking exportGpio results in an error being thrown here. This happens because fs.writeFileSync no longer accepts a number as data.
exportGpio
fs.writeFileSync
pi@raspberrypi:~/junk/node_modules/onoff/examples $ node blink-led.js internal/fs/utils.js:656 throw new ERR_INVALID_ARG_TYPE( ^ TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (17) at Object.writeFileSync (fs.js:1380:5) at exportGpio (/home/pi/junk/node_modules/onoff/onoff.js:18:8) at new Gpio (/home/pi/junk/node_modules/onoff/onoff.js:172:36) at Object.<anonymous> (/home/pi/junk/node_modules/onoff/examples/blink-led.js:4:13) at Module._compile (internal/modules/cjs/loader.js:1185:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10) at Module.load (internal/modules/cjs/loader.js:1034:32) at Function.Module._load (internal/modules/cjs/loader.js:923:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) at internal/main/run_main_module.js:17:47 { code: 'ERR_INVALID_ARG_TYPE' }
The text was updated successfully, but these errors were encountered:
Fixed by bf93550
Sorry, something went wrong.
The fix for this issue is available in [email protected]
No branches or pull requests
With Node.js 14 invoking
exportGpio
results in an error being thrown here. This happens becausefs.writeFileSync
no longer accepts a number as data.The text was updated successfully, but these errors were encountered: