简体   繁体   中英

Error: Cannot find module 'bonescript' in Cloud9

I got the error in Cloud9 Error: Cannot find module 'bonescript' When the following code excuted by node.js

enter code here
var b = require('bonescript');
b.pinMode('USR0', b.OUTPUT);
b.pinMode('USR1', b.OUTPUT);
b.pinMode('USR2', b.OUTPUT);
b.pinMode('USR3', b.OUTPUT);
b.digitalWrite('USR0', b.HIGH);
b.digitalWrite('USR1', b.HIGH);
b.digitalWrite('USR2', b.HIGH);
b.digitalWrite('USR3', b.HIGH);
setTimeout(restore, 2000);

This code can be executed by command line: node blinkLed.js in the Debian Linus on BeagelBone Black without problem. It can also be run on the beaglebone.org web demo.

Does anybody know how to solve this issue?

I had searched and try online solution for 6 hours, but not successful. I thought it might be Cloud9 config issue. I contact Cloud 9 support but get no solution.

更新:需要通过192.168.7.2:3000在BeagleBone Black上使用Cloud9, https: //ide.c9.io上的Cloud9无法找到正确的骨骼脚本库

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM