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

Node 4.1.2, start of undefined #373

Closed
ghost opened this issue Nov 3, 2015 · 13 comments
Closed

Node 4.1.2, start of undefined #373

ghost opened this issue Nov 3, 2015 · 13 comments
Labels

Comments

@ghost
Copy link

ghost commented Nov 3, 2015

TypeError: Cannot read property 'start' of undefined
    at processNode (c:\git\pos\node_modules\sass-lint\lib\rules\indentation.js:57:46)
    at processNode (c:\git\pos\node_modules\sass-lint\lib\rules\indentation.js:96:9)
    at processNode (c:\git\pos\node_modules\sass-lint\lib\rules\indentation.js:96:9)
    at Object.module.exports.detect (c:\git\pos\node_modules\sass-lint\lib\rules\indentation.js:100:5)
    at c:\git\pos\node_modules\sass-lint\index.js:44:27
    at Array.forEach (native)
    at Function.sassLint.lintText (c:\git\pos\node_modules\sass-lint\index.js:43:11)
    at DestroyableTransform._transform (c:\git\pos\node_modules\gulp-sass-lint\index.js:32:27)
    at DestroyableTransform.Transform._read (c:\git\pos\node_modules\gulp-sass-lint\node_modules\readable-stream\lib\_stream_transform.js:172:10)
    at DestroyableTransform.Transform._write (c:\git\pos\node_modules\gulp-sass-lint\node_modules\readable-stream\lib\_stream_transform.js:160:12)
@DanPurdy
Copy link
Member

DanPurdy commented Nov 3, 2015

Are you using tabs in your project?

If so see #62

@ghost
Copy link
Author

ghost commented Nov 3, 2015

@DanPurdy no, spaces all the way!

@DanPurdy DanPurdy added the bug label Nov 3, 2015
@DanPurdy
Copy link
Member

DanPurdy commented Nov 3, 2015

Would you mind trying to narrow down the code that this is occurring on then please? Just so we can see what is causing it. Thanks

@ghost
Copy link
Author

ghost commented Nov 3, 2015

Seems to be failing on all files, I tried linting 1 file at a time, fails.

@ghost
Copy link
Author

ghost commented Nov 3, 2015

Ran it directly via CLI

TypeError: Cannot read property 'start' of undefined
    at processNode (C:\Users\rbaker\AppData\Roaming\npm\node_modules\sass-lint\lib\rules\indentation.js:57:46)
    at processNode (C:\Users\rbaker\AppData\Roaming\npm\node_modules\sass-lint\lib\rules\indentation.js:96:9)
    at processNode (C:\Users\rbaker\AppData\Roaming\npm\node_modules\sass-lint\lib\rules\indentation.js:96:9)
    at Object.module.exports.detect (C:\Users\rbaker\AppData\Roaming\npm\node_modules\sass-lint\lib\rules\indentation.js:100:5)
    at C:\Users\rbaker\AppData\Roaming\npm\node_modules\sass-lint\index.js:44:27
    at Array.forEach (native)
    at Function.sassLint.lintText (C:\Users\rbaker\AppData\Roaming\npm\node_modules\sass-lint\index.js:43:11)
    at C:\Users\rbaker\AppData\Roaming\npm\node_modules\sass-lint\index.js:91:21
    at Array.forEach (native)
    at Function.sassLint.lintFiles (C:\Users\rbaker\AppData\Roaming\npm\node_modules\sass-lint\index.js:90:9)

@DanPurdy
Copy link
Member

DanPurdy commented Nov 3, 2015

Would you mind zipping up the project files and sending them to me? I can hopefully debug it then and work out what this is.

@DanPurdy
Copy link
Member

DanPurdy commented Nov 3, 2015

Or pushing them up to github somewhere! I forget we don't need floppy disks to share files some days! 😄

@ghost
Copy link
Author

ghost commented Nov 4, 2015

@DanPurdy Are you using node 4.1.3? If not can you try it?

I know it's failing on indentation, but I doubt it's a file doing it.

C:\Users\rbaker\AppData\Roaming\npm\node_modules\sass-lint\lib\rules\indentation.js:57
                  'line': node.content[i + 1].start.line,
                                             ^

@DanPurdy
Copy link
Member

DanPurdy commented Nov 4, 2015

Our indentation tests are passing against node 4.2.2

wait.. are you using scss or Sass?

Indentation is currently not working with .sass format only .scss while we wait for an update with our AST.

Current status' of rules supporting .sass can be found here

@ghost
Copy link
Author

ghost commented Nov 4, 2015

scss

On Tue, Nov 3, 2015 at 6:02 PM Dan Purdy notifications@github.com wrote:

Our indentation tests are passing against node 4.2.2

wait.. are you using scss or Sass ?


Reply to this email directly or view it on GitHub
#373 (comment)
.

@DanPurdy
Copy link
Member

DanPurdy commented Nov 4, 2015

I need to get hold of your code then and try and work out what's going on If that's possible, if you say it's happening on every file then any of them will do. I'm at a loss to say what's wrong until then.. Can you also just confirm which version of sass-lint you're using.

@ghost
Copy link
Author

ghost commented Nov 4, 2015

@DanPurdy
Copy link
Member

Hi @robertbaker,

Thanks for this, I've finally got round to looking at this and can confirm there is a bug in the indentation rule due to the CRLF line endings you're using in that file. I've created another issue which has a bit more information on the direct issue to be resolved so I'm going to close this issue in an effort to keep things manageable, you can find that issue here #382.

Thanks again for taking the time to follow up on this, hopefully this will be resolved fairly soon!

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

No branches or pull requests

1 participant