Node.js不支持Cygwin [英] Node.js Cygwin not supported

查看:256
本文介绍了Node.js不支持Cygwin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图安装node.js.我按照这个教程,我陷入了中间。



当在我的cygwin终端中写入 ./ configure 时,它说cygwin不支持。请帮我出来
提前感谢。

解决方案

Node在我的经验中运行良好, EINVAL错误似乎是MINTTY,这是一个终端仿真'皮肤',默认为cygwin。我仍然不知道为什么这些EINVAL错误发生100%,但以下是我用来获取节点工作的步骤和技巧。



在my / cygwin / home /用户名} /。bashrc我添加节点到路径所以cygwin可以找到它

  export PATH = $ PATH:/ cygdrive / c / Program Files / nodejs /



如果运行32位版本的节点:

  export PATH = $ PATH:/ cygdrive / c / Program Files(x86)/ nodejs /



然后让npm运行没有windows到linux问题我以管理模式启动cygwin,然后运行:

  dos2unix'/ cygdrive / c / Program Files / nodejs / npm'


b $ b

在这一点上,运行文件和大多数npm包将运行在MINTTY很好,虽然每次一次,你会遇到EINVAL问题与某些npm包作为karma。此外,你不能在MINTTY直接运行解释器,任何时候我想做这些事情我运行:

  cygstart / bin / bash 

这将打开一个原生的cygwin bash.exe窗口,从这里运行解释器或任何导致EINVAL的故障包命令。它有点吮吸你必须这样做,但我很少使用这一天,我非常喜欢MINTTY太多不使用它。



还要注意,你可以运行任何MINTTY中的一个行节点代码只需运行类似于

  node -econsole.log('hello node') 


I am trying to install node.js. I followed this tutorial and i am stuck in the middle.

When I write ./configure in my cygwin terminal it says "cygwin not supported". Please help me out Thanks in advance.

解决方案

Node in my experience runs fine in cygwin, what Node usually has EINVAL errors in seems to be MINTTY which is a terminal emulation 'skin' that is default to cygwin. I still am not sure why these EINVAL errors happen 100% but the following are the steps and tricks I use to get node working.

In my /cygwin/home/{username}/.bashrc I add node to path so cygwin can find it

export PATH=$PATH:"/cygdrive/c/Program Files/nodejs/"

If you run a 32 bit version of node:

export PATH=$PATH:"/cygdrive/c/Program Files (x86)/nodejs/"

Then to make npm run without windows to linux issues I launch cygwin in admin mode then run:

dos2unix '/cygdrive/c/Program Files/nodejs/npm'

At this point running files and most npm packages will run in MINTTY just fine, although every once and awhile you will run into EINVAL issues with certain npm packages as karma. Also you will not be able to run the interpreter directly in MINTTY, anytime I want to do these things I run:

cygstart /bin/bash

This will open a native cygwin bash.exe window, from here you run the interpreter or an any troubling package command that results in a EINVAL. It slightly sucks you have to do this but I rarely use this day to day, and I love MINTTY too much to not use it.

Also note that you can run any one line node code in MINTTY by just running something like:

node -e "console.log('hello node')"

这篇关于Node.js不支持Cygwin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆