question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mem-fs-editor's usage is broken in Pull request #129; passing filename as an array

See original GitHub issue

Good day,

We find error at lib/ejs.js:529:68 — property this.opts.filename could be Array and in this case we get this trace:

TypeError: this.opts.filename.replace is not a function
    at Object.Template.generateSource (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:529:68)
    at Object.Template.compile (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:444:12)
    at Object.compile (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:289:16)
    at handleCache (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:148:16)
    at Object.exports.render (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:316:10)
    at copy.process (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy-tpl.js:14:18)
    at applyProcessingFunc (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:13:16)
    at EditionInterface.exports._copySingle (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:51:16)
    at EditionInterface.<anonymous> (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:38:10)
    at Array.forEach (native)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
FredKSchottcommented, May 26, 2016

@RyanZim no worries, these things happen. And fwiw I think you’re right, calling render() with a filename array is very strange behavior that ejs probably shouldn’t be supporting.

1reaction
RyanZimcommented, May 26, 2016

@mde No tag needed. I was just leaving it open for the benefit of others affected by this change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bash - Reading filenames into an array - Stack Overflow
Use echo "$BASH_VERSION" to show the version of your currently running shell (if it's Bash) and look at the output of ps -o...
Read more >
Filename case changes broken in pull request.
A file rename only involving case changes doesn't show up properly in a pull request, even though they show correctly in the local...
Read more >
Keep size of properties arrays balanced #129 - GitHub
My initial reaction was to avoid adding code to compensate for bad input data, but I thought about this more and decided that...
Read more >
basename - Manual - PHP
Given a string containing the path to a file or directory, this function will return the trailing name component. Note: basename() operates naively...
Read more >
How to use VBA to load filename strings into an array if contains
Hi All, I'm trying to automate the amalgamation of multiple data files into a single worksheet for simpler access.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found