Coder Social home page Coder Social logo

Comments (6)

bmuenzenmeyer avatar bmuenzenmeyer commented on June 3, 2024 1

@prakashthangavelu until I can get a formal fix in - you can do the following.

  1. open ./node_modules/patternlab-node/core/lib/pattern_assembler.js
  2. find the following line, around 421:
    expandedLink = patternlab.data.link[linkMatches[i].split('.')[1]];
  3. replace with
    expandedLink = encodeURI(patternlab.data.link[linkMatches[i].split('.')[1]]);

from starterkit-mustache-demo.

bmuenzenmeyer avatar bmuenzenmeyer commented on June 3, 2024

Can you run the .json in question through a site like jsonlint.com and see
if there is in fact malformed .json?

On Sun, Aug 7, 2016, 1:11 PM prakashthangavelu [email protected]
wrote:

I am using Pattern Lab Node- Gulp Edition v1.2.4 with
'staterkit-mustache-demo' on Windows 10.
Expected Behavior

Expected 'gulp patternlab:serve' to open browser with patternlab's home
page
Actual Behavior

There was an error parsing JSON for data.json
{ [SyntaxError: Bad string at line 1 column 2198 of the JSON5 data. Still to read: "04-pages-05-about.ht"]
message: 'Bad string at line 1 column 2198 of the JSON5 data. Still to read: "04-pages-05-about.ht"',
at: 2197,
lineNumber: 1,
columnNumber: 2198 }
[23:08:45] 'build' errored after 240 ms
[23:08:45] TypeError: Cannot read property 'link' of undefined
at parseDataLinksHelper (E:\UwAmp\www\learning\node-pl\node_modules\patternlab-node\core\lib\pattern_assembler.js:420:39)
at parseDataLinks (E:\UwAmp\www\learning\node-pl\node_modules\patternlab-node\core\lib\pattern_assembler.js:450:45)
at Object.parse_data_links (E:\UwAmp\www\learning\node-pl\node_modules\patternlab-node\core\lib\pattern_assembler.js:492:7)
at buildPatterns (E:\UwAmp\www\learning\node-pl\node_modules\patternlab-node\core\lib\patternlab.js:264:23)
at Object.build (E:\UwAmp\www\learning\node-pl\node_modules\patternlab-node\core\lib\patternlab.js:391:7)
at build (E:\UwAmp\www\learning\node-pl\gulpfile.js:79:14)
at bound (domain.js:287:14)
at runBound (domain.js:300:12)
at asyncRunner (E:\UwAmp\www\learning\node-pl\node_modules\gulp\node_modules\undertaker\node_modules\bach\node_modules\async-done\index.js:36:18)
at nextTickCallbackWith0Args (node.js:420:9)
[23:08:45] 'patternlab:build' errored after 693 ms
[23:08:45] 'patternlab:serve' errored after 733 ms

Steps to Reproduce

  1. Download pre-built package and run 'npm install'
  2. npm install patternengine-node-mustache
  3. npm install starterkit-mustache-demo
  4. gulp patternlab:loadstarterkit --kit=starterkit-mustache-demo
  5. gulp patternlab:serve


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#4, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AASNw8JU2ZT6goufyHvTzYDPBMoyPZ4Bks5qdh-4gaJpZM4JejYC
.

from starterkit-mustache-demo.

prakashthangavelu avatar prakashthangavelu commented on June 3, 2024

Yes I validated the data.json in jsonlint.com, but I didn't find any error.

from starterkit-mustache-demo.

bmuenzenmeyer avatar bmuenzenmeyer commented on June 3, 2024

I've confirmed there is some bug with data.json link parsing in PL/Node.

The code is trying to convert

link.pages-about

into

/patterns/04-pages-05-about\04-pages-05-about.html

which, when stringified or put into json, is not likely valid json due to the single \,

from starterkit-mustache-demo.

prakashthangavelu avatar prakashthangavelu commented on June 3, 2024

@bmuenzenmeyer thank you. Its working.

from starterkit-mustache-demo.

bmuenzenmeyer avatar bmuenzenmeyer commented on June 3, 2024

this was merged into PL Node Core and released.
Closing

from starterkit-mustache-demo.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.