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

SyntaxError: Unexpected token . #45

Open
cyberz opened this issue Feb 23, 2018 · 3 comments
Open

SyntaxError: Unexpected token . #45

cyberz opened this issue Feb 23, 2018 · 3 comments

Comments

@cyberz
Copy link

cyberz commented Feb 23, 2018

On js file with size 4.2 Mb

events.js:183
      throw er; // Unhandled 'error' event
      ^
SyntaxError: Unexpected token .
    at Function (<anonymous>)
    at C:\projects\123\node_modules\lodash\lodash.js:14843:16
    at apply (C:\projects\123\node_modules\lodash\lodash.js:494:27)
    at C:\projects\123\node_modules\lodash\lodash.js:15227:16
    at apply (C:\projects\123\node_modules\lodash\lodash.js:496:27)
    at C:\projects\123\node_modules\lodash\lodash.js:6600:16
    at template (C:\projects\123\node_modules\lodash\lodash.js:14842:20)
    at DestroyableTransform._transform (C:\projects\123\node_modules\gulp-template\index.js:22:16)
    at DestroyableTransform.Transform._read (C:\projects\123\node_modules\readable-stream\lib\_stream_transform.js:182:10)
    at DestroyableTransform.Transform._write (C:\projects\123\node_modules\readable-stream\lib\_stream_transform.js:170:83)
    at doWrite (C:\projects\123\node_modules\readable-stream\lib\_stream_writable.js:406:64)
    at writeOrBuffer (C:\projects\123\node_modules\readable-stream\lib\_stream_writable.js:395:5)
    at DestroyableTransform.Writable.write (C:\projects\123\node_modules\readable-stream\lib\_stream_writable.js:322:11)
    at write (C:\projects\123\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:623:24)
    at flow (C:\projects\123\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:632:7)
    at DestroyableTransform.pipeOnReadable (C:\projects\123\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:664:5)
@jespersoderlund
Copy link

I get the same thing. This is in my case down to trying to templatize a non-HTML file (YAML) seems like the underlying template engine is not agnostic about the content.

@MaximBelov
Copy link

try with evaluate : false
` .pipe(template(options.variables,
{
interpolate: /{{([\s\S]+?)}}/g,
escape: /<%-([\s\S]+?)%>/g,
evaluate: false,
}
))

`

@JacobDB
Copy link

JacobDB commented Sep 30, 2018

@cyberz did you ever figure out a solution for this?

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

4 participants