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

Weird Errors (on Windows) #78

Closed
alixaxel opened this issue Mar 21, 2012 · 2 comments
Closed

Weird Errors (on Windows) #78

alixaxel opened this issue Mar 21, 2012 · 2 comments

Comments

@alixaxel
Copy link

This is what I get after a call to stylus -w ./gaia.styl:

  watching gaia\class\debug.styl
Error: nib\lib\nib\gradients.styl:120
   116|       add-property(prop, replace(val, '__CALL__', img))
   117|     start = start[1]
   118|
   119|   // legacy webkit
 > 120|   end = grad-point(opposite-position(start))
   121|   webkit-legacy = '-webkit-gradient(linear, %s, %s, %s)' % (grad-point(start) end join-stops(stops, webkit-stop))
   122|   add-property(prop, replace(val, '__CALL__', webkit-legacy))
   123|

TypeError: expected string, ident or literal, but got null:null
    at ".grid " (gaia\class\debug.styl:7)
    at ".debug " (gaia\class\debug.styl:22)

    at Object.assertString (C:\Users\Alix\AppData\Roaming\npm\node_modules\stylus\lib\utils.js:152:13)
    at C:\Users\Alix\AppData\Roaming\npm\node_modules\stylus\lib\functions\index.js:573:11
    at Array.forEach (native)
    at Evaluator.oppositePosition (C:\Users\Alix\AppData\Roaming\npm\node_modules\stylus\lib\functions\index.js:572:33)
    at Evaluator.invokeBuiltin (C:\Users\Alix\AppData\Roaming\npm\node_modules\stylus\lib\visitor\evaluator.js:783:28)
    at Evaluator.visitCall (C:\Users\Alix\AppData\Roaming\npm\node_modules\stylus\lib\visitor\evaluator.js:335:16)
    at Evaluator.<anonymous> (C:\Users\Alix\AppData\Roaming\npm\node_modules\stylus\lib\visitor\index.js:28:39)
    at Evaluator.visit (C:\Users\Alix\AppData\Roaming\npm\node_modules\stylus\lib\visitor\evaluator.js:75:18)
    at Evaluator.<anonymous> (C:\Users\Alix\AppData\Roaming\npm\node_modules\stylus\lib\visitor\evaluator.js:458:26)
    at Evaluator.<anonymous> (C:\Users\Alix\AppData\Roaming\npm\node_modules\stylus\lib\visitor\index.js:28:39)

This is the full gaia\class\debug.styl source code:

.debug
    *
        opacity: 0.90

    .grid
        background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.75) ($gridGutter * 2), rgba(255, 0, 0, 0.25) ($gridGutter * 2), rgba(255, 0, 0, 0.25)), linear-gradient(90deg, #eee 1px, transparent 1px, transparent)
        background-position: ($gridGutter * -1) 0
        background-size: (100% / $gridColumns) unit($textRhythm, 'rem')

    &.verbose // github.com/csswizardry/inuit.css/blob/1aff2367f43c96cea1634e10466d47109cf2cb04/core/css/inuit.css#L685
        [class=""],
        [id=""]
            outline: 5px solid yellow

        a
            outline: 5px solid yellow

            &[title]
                outline-color: green

            &[href="#"]
                outline-color: yellow

            &[href*="javascript"],
            &[onclick],
            &[target]
                outline-color: red

        h
            &1,
            &2,
            &3,
            &4,
            &5,
            &6
                outline: 5px solid green

        img
            outline: 5px solid red

            &[alt]
                outline-color: green

            &[alt=""]
                outline-color: yellow

Not sure if it matters, but I've even tried installing the node-canvas module (using npm install canvas -g):

npm http GET https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/canvas

> canvas@0.10.3 preinstall C:\Users\Alix\AppData\Roaming\npm\node_modules\canvas
> node-waf configure build

'node-waf' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! canvas@0.10.3 preinstall: `node-waf configure build`
npm ERR! `cmd "/c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the canvas@0.10.3 preinstall script.
npm ERR! This is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR!
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" "canvas" "-g"
npm ERR! cwd C:\xampp\htdocs\gaia\_\style
npm ERR! node -v v0.6.13
npm ERR! npm -v 1.1.9
npm ERR! code ELIFECYCLE
npm ERR! message canvas@0.10.3 preinstall: `node-waf configure build`
npm ERR! message `cmd "/c" "node-waf configure build"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\xampp\htdocs\gaia\_\style\npm-debug.log
npm not ok

I'm running Stylus 0.24.0 and nib 0.3.2. Any pointers how I could get this to work?

@tj
Copy link
Collaborator

tj commented Mar 21, 2012

linear-gradient() in nib just supports position names right now, top | left | right | bottom | center etc, no degrees yet :(

@tj
Copy link
Collaborator

tj commented Mar 21, 2012

dup of #71

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

2 participants