我无法在OS X上打包appjs应用程序

时间:2013-03-20 09:12:55

标签: macos node.js npm appjs

我不清楚,是否可以在mac上使用npm安装appj?

appjs distributable正常,但我想打包应用程序。

以下内容:

node --harmony data/app.js

返回:

/Users/richard/Downloads/app/data/node_modules/appjs/lib/bindings.js:9
  throw new Error("AppJS requires Node.js v0.8");
        ^
Error: AppJS requires Node.js v0.8
    at Object.<anonymous> (/Users/richard/Downloads/app/data/node_modules/appjs/lib/bindings.js:9:9)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/richard/Downloads/app/data/node_modules/appjs/lib/window.js:4:23)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

我在32位模式下从源安装了节点:

./configure --dest-cpu=ia32
make
sudo make install

我认为上面的问题是因为appjs可分发版本与我的本地节点版本不同步。所以我尝试使用npm安装appjs,返回以下内容:

npm install appjs

npm http GET https://registry.npmjs.org/appjs
npm http 200 https://registry.npmjs.org/appjs
npm http GET https://registry.npmjs.org/appjs/-/appjs-0.0.20.tgz
npm http 200 https://registry.npmjs.org/appjs/-/appjs-0.0.20.tgz
npm http GET https://registry.npmjs.org/mime
npm http 200 https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/mime/-/mime-1.2.9.tgz
npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.9.tgz

> appjs@0.0.20 postinstall /Users/richard/dev/product-builder/node_modules/appjs
> node cli/postinstall.js

Installing appjs-darwin package...
Error installing appjs-darwin
Please use `npm install appjs-darwin and install the package manually
appjs@0.0.20 node_modules/appjs
└── mime@1.2.9

npm install appjs-darwin

npm http GET https://registry.npmjs.org/appjs-darwin
npm http 304 https://registry.npmjs.org/appjs-darwin
npm http GET https://registry.npmjs.org/appjs-darwin/-/appjs-darwin-0.0.19.tgz
npm http 200 https://registry.npmjs.org/appjs-darwin/-/appjs-darwin-0.0.19.tgz
npm ERR! cb() never called!
npm ERR! not ok code 0

目前是否不支持OS X,或者我做错了什么?

1 个答案:

答案 0 :(得分:2)

npm install OS X安装目前标记为已损坏(https://github.com/appjs/appjs

enter image description here

App.js版本检查中似乎还有一个错误https://github.com/appjs/appjs/issues/328

请查看以下来自AppJs的说明

“AppJS在OS X上需要32位节点。它适用于64位OS X,但节点必须是32位。我们正在努力解决这个问题,但这是Chrome本身的一个限制因此它正在进行中。”