无法将NodeRED应用程序部署到运行Windows 10 IOT Core的IOT设备 [英] Failed to deploy NodeRED app to IOT device running Windows 10 IOT Core

查看:150
本文介绍了无法将NodeRED应用程序部署到运行Windows 10 IOT Core的IOT设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1。物联网设备(MinnowBoard Max)运行Windows 10 IOT核心(发布@BUILD 2015)


2。主机系统运行VS2015,带有NodeJS模板 - 使用Basic'hello world'创建项目Node.js Web服务器(Win Universal)


- 设置项目以远程调试到IOT设备IP


3。在server.js文件中嵌入Node-RED(示例Node-RED.org):

 < code style ="font-family:'Ubuntu Mono',monospace; padding:0px">  var   http   =   require   'http' );  
var express = 要求 " express" );
var 红色 = require " node-red" );

//创建Express应用
var app < span class ="x_x_o"style ="color:#859900"> = express ();

//为静态con添加简单路由帐篷由'public'提供
app 使用 " /" express static " public" ));

/ /创建服务器
var 服务器 = http createServer app ) ;

//创建设置对象 - 请参阅默认settings.js文件以获取其他选项
var settings = {
httpAdminRoot " ; / red"
httpNodeRoot " / api"
userDir " /home/nol/.nodered/"
functionGlobalContext { } //启用全局上下文
};

//使用服务器和设置初始化运行时
RED init server 设置 );

//从/ red提供编辑器用户界面
app 使用 设置 httpAdminRoot RED httpAdmin );

//从/ api 服务http节点UI
app 使用 设置 httpNodeRoot RED httpNode );

server listen 8000 );

//启动运行时
RED start ();

3。将依赖项'node-red'添加到package.json


{

  "name":"NRIOT","
  "version":" 0.0.0",$
  "description":"NRIOT",

  "main":""server.js","
  "作者":{

  &NBSP; "name":"Me","
  &NBSP; "email":""

  },b $ b  "依赖关系":{

  &NBSP; "node-red":" ^ 0.10.6"

  }
}



=>命中构建 - 报告成功


=>部署 - 获取复制文件到远程IOT设备的错误。 &NBSP;输出窗口显示:


---------------------------------- -------------------------------------------------- ---- 


所有软件包都已安装,无需恢复。

NuGet软件包恢复已完成。

------部署已启动:项目:NRIOT,配置:调试x86 ------
$
创建新的干净布局...

复制文件:布局总计41 mb ...

错误:DEP2100 :无法复制文件"F:\ NRIOT \ node_modules \ node-red \ node_modules \\ \\express\\\
ode_modules\connect\\\
ode_modules\body-parser\\\
ode_modules\iconv-lite\encodings\sbcs-数据generated.js"到目标计算机"192.168.0.109"。 

系统找不到指定的路径。 (HRESULT异常:0x80070003)

==========构建:0成功,0失败,1最新,0跳过==== ======

==========部署:0成功,1失败,0跳过==========


--------------------------------------------- -------------------------------------------------- ---------------------------


问题


当我导航到node-module文件夹时,系统无法找到该文件。  我认为路径太长是一个问题,但它不到260个字符。   
$


有谁知道为什么VS2015无法找到要复制到目标的文件?  谢谢




Codemaniac

解决方案

我的猜测是它不是在抱怨你的本地系统路径(虽然作为测试你可能会尝试将.JS文件放在C:\ temp中),但是它说你没有定义应该将该JS文件部署到的路径位置目标机器。 
如果你查看这个控制台应用程序的说明,你会发现设置原生C ++项目的部署更为复杂:


http://ms-iot.github.io/content/win10/samples/ConsoleApp.htm


请查看您是否设置了任何适用的设置,并修改了配置管理器,以便除执行构建外还"部署"。


1. IOT Device (MinnowBoard Max) running Windows 10 IOT Core (released @BUILD 2015)

2. Host system run VS2015, with NodeJS template - Create a project with the Basic 'hello world' Node.js Web Server (Win Universal)

- Setup the project to remote debug to the IOT Device IP

3. Embedding Node-RED in the server.js file (sample Node-RED.org):

var http = require('http');
var express = require("express");
var RED = require("node-red");

// Create an Express app
var app = express();

// Add a simple route for static content served from 'public'
app.use("/",express.static("public"));

// Create a server
var server = http.createServer(app);

// Create the settings object - see default settings.js file for other options
var settings = {
    httpAdminRoot:"/red",
    httpNodeRoot: "/api",
    userDir:"/home/nol/.nodered/",
    functionGlobalContext: { }    // enables global context
};

// Initialise the runtime with a server and settings
RED.init(server,settings);

// Serve the editor UI from /red
app.use(settings.httpAdminRoot,RED.httpAdmin);

// Serve the http nodes UI from /api
app.use(settings.httpNodeRoot,RED.httpNode);

server.listen(8000);

// Start the runtime
RED.start();

3. Add dependencies 'node-red' to the package.json

{
  "name": "NRIOT",
  "version": "0.0.0",
  "description": "NRIOT",
  "main": "server.js",
  "author": {
    "name": "Me",
    "email": ""
  },
  "dependencies": {
    "node-red": "^0.10.6"
  }
}

=> Hit Build - report successful

=>Deploy - Get error on copy file to remote IOT Device.   The Output Windows showed:

---------------------------------------------------------------------------------------- 

All packages are already installed and there is nothing to restore.
NuGet package restore finished.
------ Deploy started: Project: NRIOT, Configuration: Debug x86 ------
Creating a new clean layout...
Copying files: Total 41 mb to layout...
Error : DEP2100 : Cannot copy the file "F:\NRIOT\node_modules\node-red\node_modules\express\node_modules\connect\node_modules\body-parser\node_modules\iconv-lite\encodings\sbcs-data-generated.js" to the target machine "192.168.0.109". 
The system cannot find the path specified. (Exception from HRESULT: 0x80070003)
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

--------------------------------------------------------------------------------------------------------------------------

Question:

The file the system cannot located is existed as I navigated to the node-module folder.  I thought the path too long is a problem but it is less than 260 chars.   

Does anyone knows why VS2015 cannot find the file to copy to target?  Thanks


Codemaniac

解决方案

My guess is that it’s not complaining about your local system path (though as a test you might try putting the .JS file in C:\temp), but instead it’s saying you haven’t defined the path location where it should deploy that JS file to on the target machine.  If you check the instructions for this console app you’ll see that setting up the deployment of a native C++ project is a little more involved:

http://ms-iot.github.io/content/win10/samples/ConsoleApp.htm

Please see if you’ve set up any applicable settings, and also modified the Configuration Manager so it also ‘deploys’ in addition to performing the build.


这篇关于无法将NodeRED应用程序部署到运行Windows 10 IOT Core的IOT设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆