2017-04-17 69 views
0

我有问题,当试图建立离子应用 此错误离子节点错误:路径必须是字符串。收到{[字符串:

SyntaxError: Use of const in strict mode 

我认为这个问题是节点的版本,所以我安装最新版本的

当我尝试运行:离子构建Android

Error: Path must be a string. Received { [String: 
'C:\\PROGRAM FILES\\NODEJS\\NO 
DE.EXE'] 
    stdout: 'C:\\PROGRAM FILES\\NODEJS\\NODE.EXE', 
    stderr: null, 
    code: 0, 
    cat: [Function: bound ], 
    exec: [Function: bound ], 
    grep: [Function: bound ], 
    head: [Function: bound ], 
    sed: [Function: bound ], 
    sort: [Function: bound ], 
    tail: [Function: bound ], 
    to: [Function: bound ], 
    toEnd: [Function: bound ], 
    uniq: [Function: bound ] } 

,当我尝试运行:科尔多瓦插件添加科尔多瓦 - 插件白名单

Error: Path must be a string. Received { [String: 'D:\\PHONE GAP\\PROJECTS\\RENT 
CLUB\\PLATFORMS\\ANDROID\\CORDOVA\\VERSION.BAT'] 
    stdout: 'D:\\PHONE GAP\\PROJECTS\\RENTCLUB\\PLATFORMS\\ANDROID\\CORDOVA\\VERSI 
ON.BAT', 
    stderr: null, 
    code: 0, 
    cat: [Function: bound ], 
    exec: [Function: bound ], 
    grep: [Function: bound ], 
    head: [Function: bound ], 
    sed: [Function: bound ], 
    sort: [Function: bound ], 
    tail: [Function: bound ], 
    to: [Function: bound ], 
    toEnd: [Function: bound ], 
    uniq: [Function: bound ] } 

什么想法?
和三江源

回答

0

我会建议重新从节点 here安装所有的东西,Git会here,科尔多瓦和离子。

您可以通过命令npm -v和Git版本由git --version

对于科尔多瓦检查节点版本:npm install -g cordova

对于离子:npm install -g ionic

创建应用程序:ionic start appName blank

转到app文件夹:cd appName

添加平台:ionic platform add android

生成项目:ionic build android

我希望它会为你工作。

相关问题