fex-team / fis

Front-end Integrated Solution - 前端集成解决方案, 最新版请进入 FIS3 https://github.com/fex-team/fis3
http://fis.baidu.com
MIT License
2.96k stars 655 forks source link

[FAQ] FIS安装失败 #65

Open hefangshi opened 10 years ago

hefangshi commented 10 years ago

FIS作为nodejs模块发布托管在 npm上,npm是nodejs的包管理工具。查看npm网站

用户需要使用npm install命令来安装FIS。更多npm使用,执行 npm -h 来查看

由于npm经常被墙,安装FIS的时候会出现速度过慢,或者安装不上的问题 。可以通过 npm的 --registry 参数指定仓库。指定国内的npm镜像来解决npm被墙的问题。

例如:

npm install some-npm-module -g --registry=国内镜像 --disturl=https://npm.taobao.org/dist

即你可以通过下面的命令使用cnpmjs仓库安装FIS

npm install fis -g --registry=http://registry.npm.taobao.org/ --disturl=https://npm.taobao.org/dist

注意 如果提示Error: No compatible version found.. ,有可能是npm版本过低导致,可以参考 #83 解决

注意 如果提示WARN optional dep failed, continuing fsevents 警告,可以无视,这个是一个可选依赖包,仅在Mac下可以使用。

wudi0431 commented 9 years ago

MBP 安装 fis 失败

LPT41320:~ wudi$ sudo npm install fis -g

Password:

fsevents@0.3.1 install /usr/local/lib/node_modules/fis/node_modules/fis-command-server/node_modules/chokidar/node_modules/fsevents

node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/wudi/.node-gyp/0.10.33"

gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/fis/node_modules/fis-command-server/node_modules/chokidar/node_modules/fsevents/.node-gyp"

^CLPT41320:~ wudi$

LPT41320:~ wudi$ node -v

v0.10.33

LPT41320:~ wudi$ npm -v

1.4.28

hefangshi commented 9 years ago

试试看sudo npm install --unsafe-perm -g fis

oxUnd commented 9 years ago

尝试删掉 /Users/wudi/.node-gyp/0.10.33 这个目录再试

wudi0431 commented 9 years ago

谢谢 已安装成功 困为我本地没有 .node-gyp/0.10.33 这个 下载 就好了

git-lt commented 9 years ago

安装时出现以下问题 npm WARN optional dep failed, continuing fsevents@0.3.1 npm WARN optional dep failed, continuing fsevents@0.2.1 国内镜像也试过了,同样报错

oxUnd commented 9 years ago

理论上来说,可以忽略这个报错;完成后试试命令是否可以调用;

fis -v

如果不能正常工作,试图升级node版本到0.10.33,然后清除npm的缓存等来试图修复此问题。

npm cache clean
git-lt commented 9 years ago

运行 fis -v 是正常的,但是运行quickstart-demo的时候报错 C:\Users\fis-quickstart-demo>fis server start --type node starting fis-server .. fail module.js:340 throw err;

Error: Cannot find module 'crc'

C:\Users\fis-quickstart-demo>fis server start --type node starting fis-server .. fail

module.js:340 throw err; ^ Error: Cannot find module 'mime-db'

at Function.Module._resolveFilename (module.js:338:15)

node v0.10.33

hefangshi commented 9 years ago

看起来是没有安装全就取消安装了,npm WARN optional dep failed并非报错,这个提示只是指可选的依赖安装失败,但是不影响正常安装,你尝试再重新安装一下吧

youbl commented 9 years ago

报下面的错误是啥原因啊,我不用镜像,或用淘宝镜像,都出下面的错误:

npm ERR! Error: getaddrinfo ESRCH npm ERR! at errnoException (dns.js:37:11) npm ERR! at Object.onanswer as oncomplete npm ERR! If you need help, you may report this entire log, npm ERR! including the npm and node versions, at: npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 2.6.32-279.el6.x86_64 npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "fis" "-g" "--registry=http://registry.npm.taobao.org/" npm ERR! cwd /root npm ERR! node -v v0.10.33 npm ERR! npm -v 1.4.28 npm ERR! syscall getaddrinfo npm ERR! code ESRCH npm ERR! errno ESRCH npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /root/npm-debug.log npm ERR! not ok code 0

oxUnd commented 9 years ago

@youbl 怎么看着是网络配置的问题呢,无法获取DNS;你尝试这请求一把看看报错不?

$ curl http://registry.npmjs.org/fis
youbl commented 9 years ago

@xiangshouding 昨天已经解决了,就是网络不通造成的,开启了VPN,造成无法连接外网了

enforceway commented 9 years ago

lights install fis-quickstart-demo下载失败。这个也是网络原因啊?nodejs v0.10.33下出现的错误。

oxUnd commented 9 years ago

@enforceway 得贴提示,错误提示是啥?

enforceway commented 9 years ago

@xiangshouding , 我确认一下哈 ,fis是好用的,fis -v 提示版本是v1.8.6。我的问题是,执行lights install fis-quickstart-demo提示的是 Install start: Start download Component [fis-quickstart-demo@latest]. Install failed: Install [fis-quickstart-demo@latest] failed

这个提示‘Install failed: Install [fis-quickstart-demo@latest] failed’是红色的.

zhouchengi commented 9 years ago

我安装也失败了 直接git上下载压缩包吧

highsea commented 9 years ago

FIS是顺利成功了, 但是安装 _lights_ 时要求_node_版本在v0.10.27以上, 于是升级 node 时安装 n 模块报错……

$ npm install -g n

说我 windows 不兼容 0.0

npm ERR! notsup Valid OS:    !win32
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   win32
npm ERR! notsup Actual Arch: x64
npm ERR! System Windows_NT 6.1.7601

现在 下载安装包中…… node

tmeixia commented 9 years ago

怎么解决啊??????? image

oxUnd commented 9 years ago
sudo rm -rf /usr/local/lib/node_modules/fis
npm install -g fis #
tmeixia commented 9 years ago

已解决,谢谢

skybluefly commented 9 years ago

我又重新把java、php-cgi命令添加到环境变量中,输入C:\users\administrator\fis-quickstart-demo>fis server start 时报错了:[error] fail to execute 'tasklist' command,please add your system path <eg:c:\windows\system32,you should replace 'c' with your system disk> in %path%

hefangshi commented 9 years ago

@skybluefly 你的环境变量坏的比较严重,C:\Windows\System32都被删掉了,才会报这个错误

skybluefly commented 9 years ago

@hefangshi 我重新安装过系统,可以正常使用了,非常感谢你的回答!

Excepti0nasE commented 9 years ago

表示 os x 10.10安装fis也是一堆ERR报错。 换了镜像也没用。

RichardLee1978 commented 9 years ago

1 error generated. make: *\ [Release/obj.target/fse/fsevents.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12) gyp ERR! System Darwin 14.1.0 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/fis/node_modules/fis-command-server/node_modules/chokidar/node_modules/fsevents gyp ERR! node -v v0.10.35 gyp ERR! node-gyp -v v1.0.1 gyp ERR! not ok npm WARN optional dep failed, continuing fsevents@0.3.5

oxUnd commented 9 years ago

@RichardLee1978 这是因为fsevent是个addon的插件,需要编译,而你的机器上应该没有能编译通过的依赖环境。不过只要安装不挂掉,你可以忽略这个错误,等装完以后照样使用,只是性能稍微差点而已。

如果你就是想编译过去,那么你可能需要安装xcode等相关编译依赖,然后再重新安装。

Yang03 commented 9 years ago

image

oxUnd commented 9 years ago
$ export PATH=$HOME/node_modules/bin:$PATH
$ fis -v
Yang03 commented 9 years ago

谢谢楼上的,感谢....

zhangxin2540 commented 9 years ago

D:\node.js>npm install fis -g npm ERR! Windows_NT 6.1.7601 npm ERR! argv "D:\node.js\node.exe" "D:\node.js\node_modules\npm\bin\np m-cli.js" "install" "fis" "-g" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules\fis\node_m odules\fis-command-server\lib npm ERR! code EBUSY npm ERR! errno -4082

npm ERR! EBUSY, unlink 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\ fis\node_modules\fis-command-server\lib' npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! http://github.com/npm/npm/issues npm ERR! error rolling back Error: EBUSY, unlink 'C:\Users\Administrator\AppData \Roaming\npm\node_modules\fis\node_modules\fis-command-server\lib' npm ERR! error rolling back at Error (native) npm ERR! error rolling back { [Error: EBUSY, unlink 'C:\Users\Administrator\App Data\Roaming\npm\node_modules\fis\node_modules\fis-command-server\lib'] npm ERR! error rolling back errno: -4082, npm ERR! error rolling back code: 'EBUSY', npm ERR! error rolling back path: 'C:\Users\Administrator\AppData\Roaming\ \npm\node_modules\fis\node_modules\fis-command-server\lib' }

npm ERR! Please include the following file with any support request: npm ERR! D:\node.js\npm-debug.log 这个错误

zhangxin2540 commented 9 years ago

请问怎么解决呢

oxUnd commented 9 years ago

C:\Users\Administrator\AppData\Roaming\npm\node_modules\fis\node_m odules\fis-command-server\lib 被其他程序占用了,可以用小工具程序 unlocker 去除文件 、文件夹的占用。

zhangxin2540 commented 9 years ago

D:\node.js>npm install fis -g npm WARN optional dep failed, continuing fsevents@0.3.5 npm WARN optional dep failed, continuing fsevents@0.3.5 C:\Users\Administrator\AppData\Roaming\npm\fis -> C:\Users\Administrator\AppData \Roaming\npm\node_modules\fis\bin\fis fis@1.9.5 C:\Users\Administrator\AppData\Roaming\npm\node_modules\fis ├── fis-preprocessor-components@1.0.15 ├── fis-prepackager-derived@0.0.3 ├── fis-postprocessor-jswrapper@0.0.9 ├── fis-packager-map@0.0.9 ├── fis-deploy-default@0.0.2 ├── colors@0.6.2 ├── fis-spriter-csssprites@0.2.5 (node-images@1.5.5) ├── commander@1.3.2 (keypress@0.1.0) ├── fis-optimizer-png-compressor@0.0.6 (node-pngquant-native@0.0.11, node-png crush@0.1.1) ├── fis-optimizer-clean-css@0.0.9 (clean-css@1.1.7) ├── fis-optimizer-uglify-js@0.1.6 (uglify-js@2.4.15) ├── fis-command-server@0.7.1 (step@0.0.5, chokidar@0.10.5) ├── fis-command-release@0.11.4 (async@0.9.0, chokidar@0.12.5, livereload-serv er-spec@0.2.3) ├── fis-kernel@2.0.12 (iconv-lite@0.2.10, tar@0.1.17) └── fis-command-install@0.1.16 (progress-bar@0.1.1, progress@1.1.8, semver@4. 2.2, bluebird@2.9.8, findup@0.1.5, request@2.53.0, fis-scaffold-kernel@0.0.20)

D:\node.js>fis -v 'fis' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 貌似没有成功

oxUnd commented 9 years ago

C:\Users\Administrator\AppData\Roaming\npm\ 这个目录路径加到你的环境变量里面

zhangxin2540 commented 9 years ago

怎么加?没接触过这些

zhangxin2540 commented 9 years ago

@xiangshouding 等你 回复

oxUnd commented 9 years ago

搜 Baidu

在 2015年2月12日,下午4:30,话多多! notifications@github.com 写道:

@xiangshouding https://github.com/xiangshouding 等你 回复

— Reply to this email directly or view it on GitHub https://github.com/fex-team/fis/issues/65#issuecomment-74034569.

zhangxin2540 commented 9 years ago

在环境变量里啊 第一个变量名path 值C:\Users\Administrator\AppData\Roaming\npm\

zhangxin2540 commented 9 years ago

C:\Program Files\nodejs>fis server start checking java support : v1.7.0 checking php-cgi support : unsupported php-cgi environment starting fis-server .... fail 2015-02-12 18:10:02.917:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT 2015-02-12 18:10:03.549:WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnect or@0.0.0.0:8080: java.net.BindException: Address already in use: bind java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Unknown Source) at sun.nio.ch.Net.bind(Unknown Source) at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChanne lConnector.java:187) at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector. java:316) at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectCha nnelConnector.java:265) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife Cycle.java:64) at org.eclipse.jetty.server.Server.doStart(Server.java:293) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife Cycle.java:64) at com.baidu.fis.HttpServer.(HttpServer.java:87) at com.baidu.fis.HttpServer.main(HttpServer.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa der.java:58)报错了

oxUnd commented 9 years ago
0.0.0.0:8080: java.net.BindException: Address already in use: bind

8080 端口已经被占用,换一个端口 fis server start --port 8888

zhangxin2540 commented 9 years ago

感谢!

zhangxin2540 commented 9 years ago

弱弱的问下 我的3w里为什么没有map.json呢。。。

zhangxin2540 commented 9 years ago

fis release -p合并到d ./output 是合并到哪?是3w下还是demo的下载文件夹下 这个output是需要手动建的吗

zhangxin2540 commented 9 years ago

放假了吗?

oxUnd commented 9 years ago
fis release -d output

会在源码目录下编译出内容到 ./output

这块你也可以这么用

fis release -d ../output

到源码目录的上一层目录;

zhangxin2540 commented 9 years ago

我能说源码上一层目录里没有pak文件夹吗? 而3w里有 但是 3w里output文件夹是空的lib/modules/ output/node_modules/pkg这些文件夹都在同级目录下 。为什么呢?

zhangxin2540 commented 9 years ago

lib.js里就把mod.js弄进来了 其他也都没进来。合并的css一直没出现

zhangxin2540 commented 9 years ago

lib.js里就把mod.js弄进来了 其他也都没进来。

zhangxin2540 commented 9 years ago

安装完fis-postpackager-simple这个插件,执行fis release -op这个命令 总报[WARNI] missing config file [fis-conf.js]怎么解决呢?

yang6701218 commented 9 years ago

安装插件sass 插件报很多 err 怎么办

Yang03 commented 9 years ago

image 求解,谢谢!