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

Patternlinks in data gives error on windows systems #409

Closed
bramsmulders opened this issue Jul 27, 2016 · 2 comments
Closed

Patternlinks in data gives error on windows systems #409

bramsmulders opened this issue Jul 27, 2016 · 2 comments

Comments

@bramsmulders
Copy link
Contributor

I am using Pattern Lab Node v2.3.0 on Windows, with Node v4.4.1, using the Gulp Edition.

Expected Behavior

Patternlinks like:

"foo": {
    "bar": "link.to-pattern"
}

Should lik to the linked pattern

Actual Behavior

On windows the compiler gives the following error:

There was an error parsing JSON for data.json
{ [SyntaxError: Bad string at line 1 column 5944 of the JSON5 data. Still to rea
d: "03-templates-00-user"]
  message: 'Bad string at line 1 column 5944 of the JSON5 data. Still to read: "
03-templates-00-user"',
  at: 5943,
  lineNumber: 1,
  columnNumber: 5944 }
[11:46:48] 'patternlab' errored after 301 ms
[11:46:48] TypeError: Cannot set property 'patternLabHead' of undefined
    at buildPatterns (D:\data\inetpub\oypo\Sources\Oypo.Web.UI\static\node_modul
es\patternlab-node\core\lib\patternlab.js:284:36)
    at Object.build (D:\data\inetpub\oypo\Sources\Oypo.Web.UI\static\node_module
s\patternlab-node\core\lib\patternlab.js:391:7)
    at Gulp.<anonymous> (D:\data\inetpub\oypo\Sources\Oypo.Web.UI\static\gulpfil
e.js:440:8)
    at module.exports (D:\data\inetpub\oypo\Sources\Oypo.Web.UI\static\node_modu
les\gulp\node_modules\orchestrator\lib\runTask.js:34:7)
    at Gulp.Orchestrator._runTask (D:\data\inetpub\oypo\Sources\Oypo.Web.UI\stat
ic\node_modules\gulp\node_modules\orchestrator\index.js:273:3)
    at Gulp.Orchestrator._runStep (D:\data\inetpub\oypo\Sources\Oypo.Web.UI\stat
ic\node_modules\gulp\node_modules\orchestrator\index.js:214:10)
    at Gulp.Orchestrator.start (D:\data\inetpub\oypo\Sources\Oypo.Web.UI\static\
node_modules\gulp\node_modules\orchestrator\index.js:134:8)
    at C:\Users\des\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:20
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

Whereas on a mac everything just works as expected.

Steps to Reproduce
bmuenzenmeyer added a commit that referenced this issue Jul 28, 2016
was doing more, but had some trouble normalizing using path.sep
- will try that again

#409
@bmuenzenmeyer bmuenzenmeyer self-assigned this Jul 28, 2016
@bmuenzenmeyer
Copy link
Member

@bramsmulders confirmed bug and pushed a small fix. confirmed it works on Windows. Curious if it works on Mac too. can you alter your package.json to point to pattern-lab/patternlab-node#dev and see if this resolves your issue?

I had to peel back a couple more things I was trying to do with path.sep(), but I may revisit that.

@bramsmulders
Copy link
Contributor Author

Seems to be working correctly on Mac to!

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

No branches or pull requests

2 participants