草庐IT

distutils_path

全部标签

node.js - 从 NodeJS 应用程序中设置 NODE_PATH

我们有一个Node项目,它不需要来自相对路径的我们自己的子模块,而是需要将NODE_PATH环境变量设置为lib来查找所有子模块。我想在程序源代码中处理这个标准案例,但现在似乎不可能。我发现了几个解决方案都没有按预期工作。module.paths.push("./lib");在另一篇stackoverflow文章中提出了建议,但这会在较新的Node版本中导致错误消息,并建议开发人员使用NODE_PATH。相反,我尝试在程序的第一行执行以下操作。process.env['NODE_PATH']="./lib";这不会导致错误消息,但它也不起作用。我认为这个变量是在应用程序启动时读取的,而

node.js - Cordova 安装错误 : path issue (? ) - 错误代码 ENOENT

在安装Xcode和NodeJS之后,我现在正在尝试安装Cordova,但我收到以下关于缺少文件的错误(路径错误?)。Luciens-MacBook-Pro:~lucientavano$npmcachecleanLuciens-MacBook-Pro:~lucientavano$sudonpminstall-gcordovaPassword:npmWARNdeprecatednpmconf@2.1.2:thispackagehasbeenreintegratedintonpmandisnowoutofdatewithrespecttonpm/usr/local/lib└──(empty)

node.js + Jade + express : How can I create a navigation that will set class active if the path matches

我想出了以下代码,但问题是,每个菜单项都会有重复的anchor标记。有没有更好的方法来做到这一点?ul.nav-if(menu="Home")li.activea(href="#")Dashboardelselia(href="#")Dashboardlia(href="#")Aboutlia(href="#")Contact 最佳答案 在另一个questionthatwassimilar中找到了这个:在每个“li”处使用一个三元组ulli(class=(title==='Home'?'active':''))a(href='#')

node.js - grunt-contrib-jshint 警告 : path must be a string;

我一直在尝试使用jshintgrunt模块来验证我的代码,但我总是收到以下错误:Running"jshint"task[D]Tasksource:C:\Coursera\03.IntroAngularJS\conFusion\node_modules\grunt-contrib-jshint\tasks\jshint.jsRunning"jshint:all"(jshint)task[D]Tasksource:C:\Coursera\03.IntroAngularJS\conFusion\node_modules\grunt-contrib-jshint\tasks\jshint.js

node.js - 什么是在 OpenShift v2 推送 Hook 期间的最后一秒重置 PATH 变量?

TL;DR:工作应用程序,克隆它,克隆不能从pushhook正确启动(但如果我ssh进入,手动工作正常。)PATH添加了正确的Node版本,但是在最后一步的某个地方,不正确的Node版本再次被添加到PATH中。这里的路径是正确的:remote:PATH=/var/lib/openshift/.../app-root/data//node-v4.x.x-linux-x64/bin:/var/lib/openshift/.../app-root/runtime/repo/node_modules/.bin:/var/lib/openshift/...//.node_modules/.bin

node.js - Bower - 安装包 "Arguments to path.join must be strings"时出错

我刚刚创建了一个Node项目,正在尝试使用bower安装jquery。bowerinstalljquery我收到以下错误:bowerjquery#*not-cachedgit://github.com/jquery/jquery.git#*bowerjquery#*resolvegit://github.com/jquery/jquery.git#*bowerjquery#*errorArgumentstopath.joinmustbestringsStacktrace:TypeError:Argumentstopath.joinmustbestringsatf(path.js:204

ruby-on-rails - 将 Node.js 设置为 $PATH

我正在研究RoR,我正在将此虚拟机设置为“部署”RoR,但我卡在了Node.js安装中。我使用的是Ubuntu12.04,并按照本指南的此步骤操作:http://railsapps.github.com/installing-rails.htmlSinceRails3.1,aJavaScriptruntimehasbeenneededfordevelopmentonUbuntuLinux(itisnotneededforMacOSXorWindows).FordevelopmentonLinuxUbuntu,itisbesttoinstalltheNode.jsserver-sideJ

node.js - TypeError : Request path contains unescaped characters, 我该如何解决这个问题

/*Makinghttprequesttotheapi(Github)createrequestparseresponcewrapinafunction*/varhttps=require("https");varusername='lynndor';//CREATINGANOBJECTvaroptions={host:'api.github.com',path:'/users/'+username+'/repos',method:'GET'};varrequest=https.request(options,function(responce){varbody=''responce.

node.js - 错误 : The path to the driver executable must be set by the webdriver. chrome.driver 系统属性

我正在尝试node.jsseleniumwebdriverexample...varwebdriver=require('selenium-webdriver');vardriver=newwebdriver.Builder().usingServer('http://localhost:4444/wd/hub').withCapabilities(webdriver.Capabilities.chrome()).build();driver.get('http://www.google.com');driver.findElement(webdriver.By.name('q')).

javascript - 鲍尔 "Git not in the PATH"错误

我刚刚通过NPM为一个项目安装了git和bower。这是第一次使用。然后我尝试运行bowerinstalljQuery例如,我得到了这个特定的错误:ENOGITgit未安装或不在PATH中我可以在哪里实际定义路径以及如何定义路径,当我们说PATH时,主要思想是什么?另外,我真的需要一些好的资源来帮助我学习这个问题背后的概念或学习NPM的一般用法。我使用的是Windows7,64位。 最佳答案 安装msysgit,如theBowerdocumentation中所述:TouseBoweronWindows,youmustinstallm