fex-team / fis-parser-node-sass

Use node-sass to parser sass for fis/fis3.
MIT License
31 stars 23 forks source link

编译报错node v4.1.2 #1

Open changexbc opened 9 years ago

changexbc commented 9 years ago

[ERROR] load plugin [fis-parser-node-sass] config error : libsass bindings not found in /usr/local/lib/node_modules/fis-parser-node-sass/node_modules/node-sass/vendor/darwin-x64-46/binding.node. Try reinstalling node-sass?. 可能是node版本太新了,node-sass的版本不是最新的

2betop commented 9 years ago

新版本的 node-sass 可以安装吗?

changexbc commented 9 years ago

我把package.json中的node-sas改成最新版,然后安装好重新编译下好像还是不行。。 好像不能直接这样弄的吧

npm WARN cannot run in wd node-sass@3.3.3 node scripts/install.js (wd=/usr/local/lib/node_modules/fis-parser-node-sass/node_modules/node-sass)
npm WARN cannot run in wd node-sass@3.3.3 node scripts/build.js (wd=/usr/local/lib/node_modules/fis-parser-node-sass/node_modules/node-sass)
node-sass@3.3.3 /usr/local/lib/node_modules/fis-parser-node-sass/node_modules/node-sass
bash-3.2# npm rebuild node-sass
npm WARN cannot run in wd node-sass@3.3.3 node scripts/install.js (wd=/usr/local/lib/node_modules/fis-parser-node-sass/node_modules/node-sass)
npm WARN cannot run in wd node-sass@3.3.3 node scripts/build.js (wd=/usr/local/lib/node_modules/fis-parser-node-sass/node_modules/node-sass)
node-sass@3.3.3 /usr/local/lib/node_modules/fis-parser-node-sass/node_modules/node-sass
bash-3.2# npm rebuild node-sass
npm WARN cannot run in wd node-sass@3.3.3 node scripts/install.js (wd=/usr/local/lib/node_modules/fis-parser-node-sass/node_modules/node-sass)
npm WARN cannot run in wd node-sass@3.3.3 node scripts/build.js (wd=/usr/local/lib/node_modules/fis-parser-node-sass/node_modules/node-sass)
2betop commented 9 years ago

直接 npm install node-sass 呢?

changexbc commented 9 years ago

直接npm install node-sass还是不行的

2betop commented 9 years ago

那就是 node-sass 还没有发布支持 4.x 的版本,等着吧,或者降级到 node 0.12.x

changexbc commented 9 years ago

..不好意思 我理解错了 你是说直接用node-sass不用fis来编译sass是吗 我先试下

2betop commented 9 years ago

貌似 3.3.3 已经兼容 4.x 了

2betop commented 9 years ago

亲,更新这个版本试试 + fis-parser-node-sass@0.1.1

changexbc commented 9 years ago

..更新了 还是不行

 [ERROR] load plugin [fis-parser-node-sass] config error : The `libsass` binding was not found in /usr/local/lib/node_modules/fis-parser-node-sass/node_modules/node-sass/vendor/darwin-x64-46/binding.node
This usually happens because your node version has changed.
Run `npm rebuild node-sass` to build the binding for your current node version..
2betop commented 9 years ago

我猜测,你的 node 版本太高,以至于 v8 又是一个大的版本,node-sass 还没有预编译对应的二进制包,所以再等等吧

changexbc commented 9 years ago

嗯,好的,我先用0.12.7

Grifree commented 9 years ago

$ npm install fis-parser-sass npm WARN package.json @ No repository field. npm WARN package.json fms@0.0.18 No repository field.

spawn-sync@1.0.14 postinstall C:\cygwin64\home\chunyukj-689867\email\node_modules\fis-parser-sass2\node_modules\node-sass\node_modules\cross-spawn\node_modules\spawn-sync node postinstall

npm ERR! spawn-sync@1.0.14 postinstall: node postinstall npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the spawn-sync@1.0.14 postinstall script. npm ERR! This is most likely a problem with the spawn-sync package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node postinstall npm ERR! You can get their info via: npm ERR! npm owner ls spawn-sync npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "fis-parser-sass2" npm ERR! cwd C:\cygwin64\home\chunyukj-689867\email npm ERR! node -v v0.10.40 npm ERR! npm -v 1.4.28 npm ERR! syscall spawn npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm

$ node -v v0.10.40 $ npm -v 1.4.28 试过各种版本node-sass,求帮助

xpurer commented 8 years ago

软链接一下就 ok /usr/lib/node_modules/fis-parser-node-sass/node_modules/node-sass $ sudo ln -s ../../../node-sass/vendor .

atian25 commented 8 years ago

node 4.2.3 和 4.2.4 都安装不了, 要怎么办?

(00:22:46) npm install scrat
(00:23:14) npm WARN optional dep failed, continuing fsevents@0.3.8
(00:23:19) npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
(00:23:31) npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select'
(00:23:36) npm WARN optional dep failed, continuing fsevents@0.3.8
(00:23:42) npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what'
(00:23:42) 
(00:23:42) > node-pngquant-native@1.0.2 install /opt/source/node_modules/scrat/node_modules/fis/node_modules/fis-optimizer-png-compressor/node_modules/node-pngquant-native
(00:23:42) > echo "Hello, World"
(00:23:42) 
(00:23:42) Hello, World
(00:23:48) npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
(00:23:53) 
(00:23:53) > node-pngcrush@0.3.3 install /opt/source/node_modules/scrat/node_modules/fis/node_modules/fis-optimizer-png-compressor/node_modules/node-pngcrush
(00:23:53) > echo "Hello, World."
(00:23:53) 
(00:23:53) Hello, World.
(00:23:55) npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
(00:24:00) 
(00:24:00) > images@2.1.10 install /opt/source/node_modules/scrat/node_modules/fis/node_modules/fis-spriter-csssprites/node_modules/images
(00:24:00) > echo "Hello, World."
(00:24:00) 
(00:24:00) Hello, World.
(00:24:04) 
(00:24:04) > spawn-sync@1.0.15 postinstall /opt/source/node_modules/scrat/node_modules/fis-parser-node-sass/node_modules/node-sass/node_modules/cross-spawn/node_modules/spawn-sync
(00:24:04) > node postinstall
(00:24:04) 
(00:24:11) npm WARN cannot run in wd node-sass@3.3.3 node scripts/install.js (wd=/opt/source/node_modules/scrat/node_modules/fis-parser-node-sass/node_modules/node-sass)
(00:24:11) npm WARN cannot run in wd node-sass@3.3.3 node scripts/build.js (wd=/opt/source/node_modules/scrat/node_modules/fis-parser-node-sass/node_modules/node-sass)
(00:24:17) npm WARN prefer global scrat@0.5.12 should be installed with -g
(00:24:21) scrat@0.5.12 node_modules/scrat
(00:24:21) ├── scrat-preprocessor-nightcss@0.1.1
(00:24:21) ├── fis-optimizer-html-minifier@0.0.9 (html-minifier@0.6.5)
(00:24:21) ├── scrat-parser-stylus@0.0.4 (stylus@0.43.1)
(00:24:21) ├── scrat-command-install@0.1.5-2 (colors@0.6.2, rimraf@2.2.8, semver@2.3.0, debug@1.0.0, write-to@1.0.1, mkdirp@0.5.0, superagent@0.18.0, fis-kernel@2.0.3, decompress@0.2.3)
(00:24:21) ├── fis-parser-handlebars@0.0.1 (handlebars@1.3.0)
(00:24:21) ├── fis-parser-handlebars-3.x@0.0.1 (handlebars@3.0.3)
(00:24:21) ├── fis-parser-marked@0.0.6 (marked@0.3.3, highlight.js@8.6.0)
(00:24:21) ├── fis-lint-jshint@0.0.10 (jshint@2.5.11)
(00:24:21) ├── scrat-command-server@0.0.20 (hasbin@1.2.0, node-dev@2.6.2)
(00:24:21) ├── fis@1.9.37 (fis-preprocessor-components@1.0.19, fis-packager-map@0.0.9, fis-deploy-default@0.0.6, fis-prepackager-derived@0.0.3, fis-postprocessor-jswrapper@0.0.12, colors@0.6.2, commander@1.3.2, fis-optimizer-clean-css@0.0.9, fis-optimizer-uglify-js@0.1.14, fis-command-release@0.12.2, fis-kernel@2.0.17, fis-optimizer-png-compressor@0.1.2, fis-command-install@0.2.1, fis-command-server@0.7.5, fis-spriter-csssprites@0.3.5)
(00:24:21) ├── scrat-deploy-compress@0.1.1 (jszip@2.5.0, moment@2.11.0, request@2.67.0, lodash@3.10.1)
(00:24:21) ├── fis-parser-node-sass@0.1.1 (node-sass@3.3.3)
(00:24:21) ├── scrat-command-init@0.1.3 (colors@0.6.2, debug@1.0.2, generator-scrat@0.2.2-1, yeoman-generator@0.17.0)
(00:24:21) ├── scrat-parser-babel@0.0.1 (babel-core@5.8.34)
(00:24:21) └── fis-parser-less@0.1.3 (less@1.7.5)

(00:24:22) npm rebuild node-sass
(00:24:27) npm WARN cannot run in wd node-sass@3.3.3 node scripts/install.js (wd=/opt/source/node_modules/scrat/node_modules/fis-parser-node-sass/node_modules/node-sass)
(00:24:27) npm WARN cannot run in wd node-sass@3.3.3 node scripts/build.js (wd=/opt/source/node_modules/scrat/node_modules/fis-parser-node-sass/node_modules/node-sass)
(00:24:27) node-sass@3.3.3 /opt/source/node_modules/scrat/node_modules/fis-parser-node-sass/node_modules/node-sass
(00:24:28)  ./node_modules/.bin/scrat release -opmcuDd ../scrat-release
(00:24:29) 
(00:24:29)  δ 3ms
(00:24:29) 
(00:24:35)  Ω .......
(00:24:35)  [ERROR] load plugin [fis-parser-node-sass] error : The `libsass` binding was not found in /opt/source/node_modules/scrat/node_modules/fis-parser-node-sass/node_modules/node-sass/vendor/linux-x64-46/binding.node
(00:24:35) This usually happens because your node version has changed.
(00:24:35) Run `npm rebuild node-sass` to build the binding for your current node version.
atian25 commented 8 years ago

@2betop 帮忙看下

2betop commented 8 years ago

�npm rebuild node-sass� (00:24:27) npm WARN cannot run in wd node-sass@3.3.3 node scripts/install.js (wd=/opt/source/node_modules/scrat/node_modules/fis-parser-node-sass/node_modules/node-sass) (00:24:27) npm WARN cannot run in wd node-sass@3.3.3 node scripts/build.js (wd=/opt/source/node_modules/scrat/node_modules/fis-parser-node-sass/node_modules/node-sass)

看样子是 sudo 的原因 npm rebuild 没有成功执行,以至于二进制包没有装上。可以先本地 npm install node-sass 然后把这个包替换全局环境下面的 node-sass

atian25 commented 8 years ago

@2betop 我这个是在公司的CI上的, 那时自动分配的干净的虚拟机, 没法做这事 0_0

后面那句 npm rebuild node-sass 是我额外加的, 因为上面安装不成功, 提示重新 rebuild

atian25 commented 8 years ago

@2betop npm install --unsafe_perm 就ok

2betop commented 8 years ago

好,原来可以这让绕过那个权限问题。