Tag: macos

麻烦与NPM

安装节点0.6.6后,我遇到了这个问题 https://github.com/isaacs/npm/issues/1842 我不知道如何去执行该post中的解决scheme。 我的错 Error: No such module at Object.<anonymous> (/opt/local/lib/node_modules/npm/lib/utils/config-defs.js:5:21) 谢谢!

meteor需要sudo来运行

以前我只能通过运行mrt来启动Meteor 0.6.6.3。 最近,meteor0.7.0.1将无法正常运行,除非我作为根与sudo mrt运行它。 像MONGO_URL这样的环境variables需要root来设置它。 任何想法发生了什么? 我在Mac OSX上使用Mountain Lion。

尝试安装pm2时出错

我想在我的MAC OS版本10.8.5上安装pm2。 但是当我安装它。 我在我的MAC上安装了XCODE 5.1.1。 但即使这样做后,我正在得到gyp的ERR! 堆栈错误:找不到:make“.IS不是GNU make自带的XCODE,应该是理想的工作。 尝试安装时请看下面的错误。 Rajeshs-MacBook-Pro:〜rajesh $ npm install pm2 > fsevents@0.3.1 install / Users / rajesh / node_modules / pm2 / node_modules / chokidar / node_modules / fsevents > node-gyp重build child_process:customFds选项已弃用,请改用stdio。 – 同意Xcode / iOS许可证需要pipe理员权限,请通过sudo以root身份重新运行。 gyp ERR! build立错误 gyp ERR! 堆栈错误:找不到:make gyp ERR! 堆栈在F(/Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/which/which.js:43:28) gyp ERR! E(/Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/which/which.js:46:29) gyp ERR! 栈/Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/which/which.js:57:16 […]

如何在NodeJs上创build2亿个元素的数组?

做一些基准testing,我试图创build一个巨大的数组。 代码很简单: var hugeArray = []; for (var i = 0; i < 2*1000*1000*100; i ++) { hugeArray.push(Math.ceil(Math.random()*100)) } console.log(hugeArray.length); 我用200万个元素运行它后,我得到了FATAL ERROR: invalid array length Allocation failed – JavaScript heap out of memory 。 有了2000万的元素,这个效果很好,所以我认为我需要改变一些设置。 我正在使用8 GB的RAM的MacOS,如果有帮助。

在Mac OS X Lion上安装npm@1.1.1时出错

我正试图在Mac OS X Lion上使用express框架。 有这些问题: SilverFir-2:Node mike$ sudo curl http://npmjs.org/install.sh | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7881 100 7881 0 0 29556 0 –:–:– –:–:– –:–:– 43541 tar=/usr/bin/tar version: bsdtar 2.8.3 – libarchive 2.8.3 install npm@1.1 fetching: http://registry.npmjs.org/npm/-/npm-1.1.1.tgz 0.6.1 1.1.1 […]

在node.js安装节点文件夹的位置?

它目前位于目录:/ Users / myusername / node 但我觉得应该更接近根? 也许在/ Developer? 我无法在网上find其他build议。 我现在在macosx狮子。 谢谢!

meteor应用中的“jQuery没有定义”?

似乎在下载semantic-ui后出现一个奇怪的错误,当我select了我所做的,而不想在我的custom.semantic.json文件中的时候,我无法运行它。 我已经尝试下载/安装jQuery包到我的目录没有喜悦。 下面的错误消息。 >/Users/Kyle/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245 throw(ex); ^ > ReferenceError: jQuery is not defined > at app/definitions/behaviors/api.js:1081:5 > at app/definitions/behaviors/api.js:1083:3 > at /Users/Kyle/Desktop/portfolio/.meteor/local/build/programs/server/boot.js:222:10 > at Array.forEach (native) > at Function._.each._.forEach (/Users/Kyle/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11) > at /Users/Kyle/Desktop/portfolio/.meteor/local/build/programs/server/boot.js:117:5 > Exited with code: 8 Your application is crashing. Waiting for file > change.

在Mac OSX 10.6.7上安装节点时出现问题

当我尝试在我的新Mac上安装节点时出现此错误 错误:无法configurationcxx编译器! 当我到达安装的./configure部分时,总是出现错误 我发现这个问题适用于具有相同错误的Linux版本,但解决scheme似乎不适用于我的情况: 如何编译/安装node.js(不能configurationcxx编译器!)(Ubuntu)。 我也看了一下节点wiki上的故障排除指南: https://github.com/joyent/node/wiki/Troubleshooting-Installation 并试过这个解决scheme: export PATH=/Developer/usr/bin:$PATH ISYSROOT="-isysroot /Developer/SDKs/MacOSX10.5.sdk" export LINKFLAGS=$ISYSROOT CXXFLAGS=$ISYSROOT CFLAGS=$ISYSROOT ./configure –prefix=$HOME –without-ssl make 但是当我进入./configure步骤时,我遇到了同样的问题 任何build议,见解或帮助将在这里大大赞赏。 谢谢

节点:找不到模块(使用brew安装的节点)

我尝试运行我在节点中编写的脚本。 为了debugging并向您显示我的问题,我将脚本简化为: #! /usr/bin/env node var prompt = require('prompt'); 当我尝试运行我得到的脚本 module.js:340 throw err; ^ Error: Cannot find module 'prompt' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/Users/derzyklop/S/dotfiles/bin/bugs:3:14) 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 Function.Module.runMain (module.js:497:10) 我试图用npm install prompt安装“prompt”,而用npm install prompt -g也是全局的。 […]

NPM模块需要从/ Users / node_modules /而不是项目目录

我的反应原生项目一直运行良好,直到我将反应本机从0.17升级到0.18,然后是0.19。 自从升级任何模块(例如app-module-path)之后,我: 使用npm npm install –save app-module-path成功安装 add require('app-module-path').addPath(__dirname); 在我的代码 运行模拟器时出现以下错误: Unable to resolve module from /Users/MyUserName/myfolder/projectname/node_modules/app-module-path/lib/index.js: Invalid directory /Users/node_modules/module 它似乎是在错误的path寻找模块。 我试图清除所有的caching,卸载重新安装react-native,然后重新启动我的机器,甚至从头开始一个干净的项目,问题依然存在。 我已经尝试了所有正式发布的解决scheme,没有任何运气: https : //github.com/facebook/react-native/issues/4968 npm:3.3.12 React-Native:0.19 OSX:10.11.2守望者:稳定4.1.0(瓶装),HEAD 我正在寻找任何types的解决scheme来修复我的环境,而不会丢失我的代码以及我在XCode和Android项目中添加的一些集成,以添加一些模块。 提前非常感谢!