Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Fix various errors #114

Merged
merged 5 commits into from Mar 23, 2022
Merged

Fix various errors #114

merged 5 commits into from Mar 23, 2022

Conversation

andygup
Copy link
Member

@andygup andygup commented Jan 26, 2022

  • Fixed small linter errors in styles.ts
  • Removes trailing slash from preview copy in scaffold.ts
  • Removes copy commands from cleanDirectories.ts

Tested locally - creating themes and new widgets seems to be working again.

Related: #105, #106

@andygup andygup requested review from jcfranco and odoe January 26, 2022 16:43
@andygup andygup self-assigned this Jan 26, 2022
Copy link
Collaborator

@odoe odoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like this is working for me locally. Can someone test on Windows to be sure?

Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@andygup
Copy link
Member Author

andygup commented Jan 27, 2022

@odoe I added d4233ee to replace fs-extra with cpy in createWidget.ts.

This fix attempts to resolve a known issue with fs-extra that throws Error: Widget creation failed: Source and destination must not be the same. I see that fs-extra is used in three other places, so this may not be a complete fix.

Here's the full error dump:

Error: Widget creation failed: Source and destination must not be the same.
    at _callee$ (/Users/xyz/.volta/tools/image/packages/@arcgis/cli/lib/node_modules/@arcgis/cli/dist/lib/createWidget.js:142:61)
    at tryCatch (/Users/xyz/.volta/tools/image/packages/@arcgis/cli/lib/node_modules/@arcgis/cli/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/Users/xyz/.volta/tools/image/packages/@arcgis/cli/lib/node_modules/@arcgis/cli/node_modules/regenerator-runtime/runtime.js:294:22)
    at Generator.throw (/Users/xyz/.volta/tools/image/packages/@arcgis/cli/lib/node_modules/@arcgis/cli/node_modules/regenerator-runtime/runtime.js:119:21)
    at asyncGeneratorStep (/Users/xyz/.volta/tools/image/packages/@arcgis/cli/lib/node_modules/@arcgis/cli/dist/lib/createWidget.js:56:22)
    at _throw (/Users/xyz/.volta/tools/image/packages/@arcgis/cli/lib/node_modules/@arcgis/cli/dist/lib/createWidget.js:66:291)

References: jprichardson/node-fs-extra#657

On a side note, I also noticed that the npm installed build has an async generator in createWidget.js and my local build does not. We may want to set a TS target?

image

@odoe odoe merged commit 8d3abfb into master Mar 23, 2022
@odoe odoe deleted the various_errors branch March 23, 2022 17:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants