简体   繁体   English

在Mac上通过Node.js创建Phonegap项目时出现错误

[英]I am getting an error while creating a Project of Phonegap through Node.js in my mac

I Installed Node Js and Git on my Mac. 我在Mac上安装了Node Js和Git。 Through Node JS i am downloading the phonegap and than creating its project on my desktop. 通过Node JS,我正在下载phonegap,而不是在桌面上创建其项目。 Heres what i am getting in return, could somebody tell me what am doing wrong? 这是我得到的回报,有人可以告诉我做错了什么吗?

Aleems-MacBook-Pro:desktop aleemahmad$ phonegap create Cartoonsmart
/usr/local/lib/node_modules/phonegap/lib/phonegap/util/connect-proxy.js:21
                fs.readFile(settings, (err, data) => {
                                                  ^^
SyntaxError: Unexpected token =>
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/phonegap/lib/phonegap/serve.js:9:23)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
Aleems-MacBook-Pro:desktop aleemahmad$ 

For creating new project in Phonegap, the command is 要在Phonegap中创建新项目,命令是

phonegap create [foldername] [packagename] [projectname] phonegap创建[文件夹名称] [程序包名称] [项目名称]

For example :: 例如 ::

phonegap create Demo com.demo Demo. phonegap创建演示com.demo演示。

In this first "Demo" is folder name, com.demo is package name, Demo is project name/application name. 在这第一个“ Demo”中是文件夹名称,com.demo是程序包名称,Demo是项目名称/应用程序名称。

Try this, It will work for you. 试试这个,它将为您工作。

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将我的项目上传到 Heroku 时出现此错误。 我正在使用 MapBox 和 node.js - I am getting this error while uploading my project to Heroku. I am using MapBox and node.js 使用 express node.js 更新数据时出现错误 - i am getting an error while i am updating my data using express node.js 在 node.js 应用程序中创建一组类型的 redis 数据库时出现类型错误 - I am getting a Type Error when creating a set type of redis database in node.js app 运行node.js脚本时出现以下错误 - I am getting following errors while running my node.js script 我的服务器已启动,但是当我尝试连接它时,出现错误[Node.js] - My Server is up but when I try to connect to it I am getting an error [Node.js] 运行node.js应用程序时出现错误(也使用Rabbit) - I am getting an error when i run my node.js app ( also using rabbit ) 通过 node.js 连接到 mysql 时出现未知数据库错误 - I'm getting unknown database error while connecting to mysql through node.js 为什么我从node.js收到此错误? - Why am I getting this error from node.js? 我收到此错误: Block is not a constructor in node.js - I am getting this error: Block is not a constructor in node.js 创建节点JS Express应用程序项目时出错 - getting error while creating node js express app project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM