无法在CLOUD9上BeagleBone运行bonescript文件(Unable to run b

2019-07-29 07:56发布

我在使用的IDE CLOUD9运行,将其用埃的Linux的预装版本BeagleBone使用bonescript文件的麻烦。 我使用CLOUD9在3000:HTTP://beaglebone.local在OSX 10.7在Chrome 18。

当我运行Bonescript blinkled.js示例代码CLOUD9输出这样的错误:

Output
node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
       ^
Error: Cannot find module '/var/lib/cloud9'
    at Function._resolveFilename (module.js:326:11)
    at Function._load (module.js:271:25)
    at Array.<anonymous> (module.js:430:10)
    at EventEmitter._tickCallback (node.js:126:26)

如果按照建议我尝试添加在运行配置文件路径在这个问题的StackOverflow我在控制台中此错误(在鲜红的头脑你):

[C9 Server Exception 2] undefined

在这一点上也CLOUD9停止响应,我必须重新加载页面,以试图进一步使用它。

如果我添加“blinkled.js”作为文件路径我得到这个错误:

'inotify' not loaded
If desired, try installing it with:
  curl http://npmjs.org/install.sh | bash
  npm install inotify
'fibers' not loaded
If desired, try installing it with:
  curl http://npmjs.org/install.sh | bash
  npm install fibers
Delay operations loops will consume CPU cycles
Invoke using 'node-fibers' if node version < 0.5.2

不知道我应该摆在那里。

我一直在谷歌上搜索,现在这些各种错误约24小时。

这似乎是一个伟大的工具,如果我只能得到它的工作。 有任何想法吗?

更新1

实现opkg后未能加载所需的inotify和纤维包我手动安装它们,并再次尝试。 现在我得到的命令行上此错误:

# node blinkled.js 
gpio: 38 already exported.
{ [Error: EBUSY, resource busy or locked] errno: 10, code: 'EBUSY', syscall: 'write' }
Unable to export gpio: 56

Answer 1:

现在我知道有许多问题:

首先,我应该检查的文件以获得Node.js的工作。 当我应该一直在使用的console.log()我只是认为警报()是一个功能。 所以一旦我意识到了这一点,我能够在CLOUD9运行这个文件:

var hello = "hello world"
console.log(hello);

其次,当我试图安装使用它置于他们在我的工作目录的node_modules目录故宫包管理器库(的inotify和纤维):

/home/root/

......不是默认CLOUD9根目录我以为它会:

/var/lib/cloud9

第三,已经远销我的脚,只需重新启动BeagleBone这是固定的。

最后,我发现,在我的主目录中的最新版本创建一个新的实例bonescript让我跑blinkled.js示例文件,以及该文件在此进行测试的BeagleBone,所有模拟引脚的命令行。



Answer 2:

你可能会做在/ var / lib中/ CLOUD9一个“git的拉”来获得更新。 有一件事我已经添加了一个“analogRead”功能。



Answer 3:

我给她买小猎犬骨转。 A4。 这种类型的错误是对正在添加也。 我刚才做与最新埃像新的SD卡,并且的Blinky工作正常,然后了。



文章来源: Unable to run bonescript files in Cloud9 on BeagleBone