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

"targetModule" should be a string - marko-hydrate error #10

Open
BryceEWatson opened this issue Feb 5, 2018 · 1 comment
Open

"targetModule" should be a string - marko-hydrate error #10

BryceEWatson opened this issue Feb 5, 2018 · 1 comment

Comments

@BryceEWatson
Copy link

BryceEWatson commented Feb 5, 2018

One of my pages is failing with the below stack:

Exception: Error: Failed to walk dependency [marko-hydrate:
.........
Cause: AssertionError [ERR_ASSERTION]: "targetModule" should be a string
    at module.exports (/Users/brywatson/e4csite/node_modules/lasso/node_modules/raptor-util/createError.js:7:50)
    at walkDependency (/Users/brywatson/e4csite/node_modules/lasso/src/dependency-walker.js:123:23)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)

I added some debug logic at lasso/src/resolve/index.js:29 and found that the below less object is coming in the targetModule and causing the crash:

{ type: 'less',
  code: '.app-terms {\n        background-color: #FFF;\n    }\n    .terms__container {\n        padding: 0px 35px 35px 35px;\n    }',
  virtualPath: './index.marko.less',
  path: './index.marko' }

If I remove the style from this template it will use the next less style it finds to cause the crash. This does not happen on other pages that are loading in what appears to be identical ways.

I'm using marko@4.7.5 lasso@3.1.2 and lasso-marko@2.4.0

@BryceEWatson
Copy link
Author

Note: Downgrading to lasso-marko@2.3.1 fixes the issue, so maybe there is some other issue with latest lasso-marko?

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

1 participant