You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to rename the widget directory (in destinationPath) to a name that the user enters during the prompting stage. Here's how I'm attempting this:
The call to copyTpl is correctly scaffolding and templating the app from the templatePath to the destinationPath. However, when the fs.move operation is called, I get the following error message:
PS C:\Users\username\code\generator-dashboard-widget-test> yo dashboard-widget
? Your widget's name: (generator-dashboard-widget-test)
? Your widget's name: generator-dashboard-widget-test
events.js:154
throw er; // Unhandled 'error' event
^
AssertionError: Trying to copy from a source that does not exist: C:\Users\username\code\generator-dashboard-widget-test\app\widget
at EditionInterface.exports._copySingle (C:\Users\username\code\generator-dashboard-widget\node_modules\mem-fs-editor\lib\actions\copy.js:45:3)
at EditionInterface.exports.copy (C:\Users\username\code\generator-dashboard-widget\node_modules\mem-fs-editor\lib\actions\copy.js:23:17)
at EditionInterface.module.exports [as move] (C:\Users\username\code\generator-dashboard-widget\node_modules\mem-fs-editor\lib\actions\move.js:4:8)
at module.exports.generators.Base.extend.copyAppTemplate (C:\Users\username\code\generator-dashboard-widget\generators\app\index.js:54:17)
at Object.<anonymous> (C:\Users\username\code\generator-dashboard-widget\node_modules\yeoman-generator\lib\base.js:431:23)
at C:\Users\username\code\generator-dashboard-widget\node_modules\run-async\index.js:26:25
at C:\Users\username\code\generator-dashboard-widget\node_modules\run-async\index.js:25:19
at C:\Users\username\code\generator-dashboard-widget\node_modules\yeoman-generator\lib\base.js:432:9
at processImmediate [as _immediateCallback] (timers.js:383:17)
From what I understand from the Yeoman file system documenation, all actions on the virtual file system are synchronous, so the app/widget directory should exist before the mem-fs-editor instance attempts to move it.
Is there a different way I should be renaming the directory?
I think the issue is the virtual file system doesn't store references to folders. It might work using a glob pattern, but I'm not sure glob matching if going to work over the virtual files.
I'm trying to rename a folder in the destination directory. The directory structure inside my
templates
folder looks like this:I'm trying to rename the
widget
directory (indestinationPath
) to a name that the user enters during theprompting
stage. Here's how I'm attempting this:The call to
copyTpl
is correctly scaffolding and templating the app from thetemplatePath
to thedestinationPath
. However, when thefs.move
operation is called, I get the following error message:From what I understand from the Yeoman file system documenation, all actions on the virtual file system are synchronous, so the
app/widget
directory should exist before themem-fs-editor
instance attempts to move it.Is there a different way I should be renaming the directory?
Here's some debug info:
I'm on Windows 8.1.
The text was updated successfully, but these errors were encountered: