arcgis/cli styles tool issue

1041
3
Jump to solution
05-26-2021 01:06 PM
by Anonymous User
Not applicable

I installed @arcgis/cli using 'npm install -g @arcgis/cli' on my Windows machine. When I create a new directory, cd into it, and then try to run the 'styles create' command, this is the error it produces:

 

 

C:\Users\cfb215.STATE\Desktop\testStyles>arcgis styles create newStyle
copying base
copying examples
copying preview file
arcgis styles create [theme]

Create a custom theme

Positionals:
theme the name of the theme to create [string] [default: "my-custom-theme"]

Options:
--version Show version number [boolean]
-e, --with-examples when specified, the created theme will include examples
from the API [boolean]
-b, --with-base when specified, the created theme will include base files
for local overrides (advanced) [boolean]
-f, --force overwrites a theme if it already exists [boolean]
-h, --help Show help [boolean]

NestedError: Cannot copy `preview/`: the file doesn't exist
at C:\Users\cfb215.STATE\AppData\Roaming\npm\node_modules\@arcgis\cli\node_modules\cpy\index.js:96:10
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
nested: undefined,
name: 'CpyError'
}

 

 

 

Is this a know or common issue? It looks like the file does exist but for some reason isn't able to be copied to the new

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Okay, I just tried without the capital 'S' in the name, all lowercase and it appears to have worked. If that is documented, I missed it.

View solution in original post

0 Kudos
3 Replies
by Anonymous User
Not applicable

Okay, I just tried without the capital 'S' in the name, all lowercase and it appears to have worked. If that is documented, I missed it.

0 Kudos
ReneRubalcava
Frequent Contributor

This is odd. Windows I assume? The command definition isn't camelcase https://github.com/Esri/arcgis-js-cli/blob/master/src/commands/styles.ts#L4 So i'm not sure why that would happen. I don't use Windows often, but will still take a look. Thanks!

0 Kudos
by Anonymous User
Not applicable

Yes, this is on a Windows 10 box. Thanks for checking in.

Using lowercase is not a big deal, but was confusing! I was able to successfully output a main.css file. However the styles tool still does not like to preview the theme (cannot GET error in Chrome), and if I eject the theme is remains in the directory but can not be ejected again. Let me know if you want any more detail or error messages. Thanks

0 Kudos