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.

Direflow-cli does not work at all in Windows shell environments

See original GitHub issue

Describe the bug
Direflow CLI does not work in windows shell environments. It will crash out when renaming components

To reproduce
Steps to reproduce the behavior: 0. Open cmd, powershell, etc… in Windows

  1. npm install -g direflow-cli
  2. direflow create
  3. fill out name, description, language, module
  4. See error
direflow create

? Choose a name for your Direflow Setup: test1234

? Give your Direflow Setup a description (optional)

? Which language do you want to use? JavaScript

? Do you want this to be an NPM module? No
[Error: EPERM: operation not permitted, rename 'C:\Source\test1234-component\src\direflow-components\direflow-component' -> 'C:\Source\test1234-component\src\direflow-components\test1234-component'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'rename',
  path: 'C:\\Source\\test1234-component\\src\\direflow-components\\direflow-component',
  dest: 'C:\\Source\\test1234-component\\src\\direflow-components\\test1234-component'
}

Unfortunately, something went wrong creating your Direflow Component
Error: Could not rename component folder
    at C:\Users\rsilver\AppData\Roaming\npm\node_modules\direflow-cli\dist\helpers\copyTemplate.js:80:40
    at FSReqCallback.oncomplete (fs.js:146:23)

Expected behavior
Successful creation of my project

Package Manager:
To install Direflow, I used… (npm / yarn / something else) npm Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
This is more than likely an issue with filepaths as using something that doesn’t use Windows file paths such as git-bash will work correctly

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SimonHoibergcommented, May 17, 2020

Hi @Elindalyne Thank you for creating this issue.

We will investigate as soon as possible.

0reactions
tomasdanek83commented, Jan 29, 2021

STR and error are identical to the original ones of this issue. I tried to run the command in several different folders. Command line running as administrator. It fails also in Git Bash.

Env: Windows 10, NodeJS v14.15.4

Anyway, I modified the template manually meanwhile and it works great!

Read more comments on GitHub >

github_iconTop Results From Across the Web

set (environment variable) - Microsoft Learn
If command extensions are enabled (the default) and you run set with a value, it displays all of the variables that begin with...
Read more >
Command-line shells & prompt for developers - Visual Studio ...
This shell has the same environment variables set as Developer Command ... To open the terminal in Visual Studio, select View > Terminal....
Read more >
Windows commands | Microsoft Learn
Scripts accept all commands that are available at the command line. ... but the Command shell can only run Windows Commands and not...
Read more >
Windows Terminal command line arguments | Microsoft Learn
Learn how to create command line arguments for Windows Terminal.
Read more >
Use the Microsoft C++ toolset from the command line
This article is about how to set up an environment to use the individual compilers, linkers, librarian, and other basic tools. The native ......
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