Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jdf build 失败 #41

Closed
GuoYongfeng opened this issue Dec 26, 2016 · 8 comments
Closed

jdf build 失败 #41

GuoYongfeng opened this issue Dec 26, 2016 · 8 comments

Comments

@GuoYongfeng
Copy link

jdf build 失败

版本2.1.12

操作

执行命令

$ jdf install demo & cd jdf_demo & jdf build

报错信息

jdf error [jdf.getConfig] - config.json format error
Error: `libsass` bindings not found in /usr/local/lib/node_modules/jdf/node_mod
ules/jdf-sass/node-sass/vendor/darwin-x64-51/binding.node. Try reinstalling `no
de-sass`?
    at Object.sass.getBinaryPath (/usr/local/lib/node_modules/jdf/node_modules/
jdf-sass/node-sass/lib/extensions.js:148:11)

    at Object.<anonymous> (/usr/local/lib/node_modules/jdf/node_modules/jdf-sas
s/node-sass/lib/index.js:16:36)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/jdf/node_modules/jdf-sas
s/index.js:1:80)
/usr/local/lib/node_modules/jdf/node_modules/jdf-sass/node-sass/lib/extensions.
js:148

@putaoshu
Copy link
Owner

jdf-sass好像没有安装成功,建议你npm clean cache后重新安装

@GuoYongfeng
Copy link
Author

@putaoshu 执行后不 work

操作步骤

$ npm cache clean
$ sudo npm uninstall jdf -g
$ sudo npm i jdf -g
$ sudo npm i node-sass -g

运行

$ jdf build

报错信息

同上

@loveky
Copy link
Contributor

loveky commented Dec 31, 2016

看报错信息,目测是jdf-sass和系统的node版本对不上

@putaoshu
Copy link
Owner

putaoshu commented Jan 1, 2017

恩,升级node至4.2.6+,重新安装试试

@GuoYongfeng
Copy link
Author

@putaoshu node V7.x & V6.x 版本都不行,降到4.x版本的node可以,建议升级修复吧。

@putaoshu
Copy link
Owner

putaoshu commented Jan 3, 2017

@wshxbqq jdf-sass在node V7.x & V6.x版本是不是还不支持?

@GuoYongfeng
Copy link
Author

这块个人建议需要升级一下,如果jdf打算更通用的话,有几点考虑:

  1. 并不是所有人都会sass
  2. 并不是所有项目都需要sass
  3. 即使用css预处理器,也应该提供可选项吧,比如less、stylus以及其他
  4. 如果默认用sass,但jdf-sass依赖的node-sass这个模块在windows上安装会有编译问题,出错后对新手也是不友好的

以上,仅供参考和讨论,多谢。

@putaoshu
Copy link
Owner

putaoshu commented Jan 6, 2017

@GuoYongfeng 明白你的意思了,就是做成可插拔的插件形式,不过这样整体的变动会比较大。jdf-sass已经不维护,下个版本我会先替换成node-sass。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants