pnp / sp-dev-fx-aces

Repository for the Microsoft Viva Connections Adaptive Card sample solutions from Microsoft and community.
https://aka.ms/viva/connections/extensibility
MIT License
109 stars 92 forks source link

BasicCard-Multiple-Forms-Apps: Eslinit issue on gulp serve #156

Closed vdowney closed 9 months ago

vdowney commented 9 months ago

Sample

BasicCard-Multiple-Forms-Apps

Authors

Marcus Castro

Expected or Desired Behavior

Process gulp serve

Observed Behavior

Error - [lint] Unexpected STDERR output from ESLint: Oops! Something went wrong! :( ESLint: 8.7.0 TypeError: Cannot read properties of undefined (reading 'getFirstToken') Occurred while linting C:\Users**\Documents\Projects\Samples\sp-dev-fx-aces\samples\BasicCard-Multiple-Forms-Apps\src\adaptiveCardExtensions\aceForms\AceFormsAdaptiveCardExtension.ts:30 Rule: "@typescript-eslint/no-extra-semi" at ClassBody (C:\Users**\Documents\Projects\Samples\sp-dev-fx-aces\samples\BasicCard-Multiple-Forms-Apps\node_modules\eslint\lib\rules\no-extra-semi.js:130:52) at ruleErrorHandler (C:\Users**\Documents\Projects\Samples\sp-dev-fx-aces\samples\BasicCard-Multiple-Forms-Apps\node_modules\@microsoft\rush-stack-compiler-4.5\node_modules\eslint\lib\linter\linter.js:1079:28) at C:\Users**\Documents\Projects\Samples\sp-dev-fx-aces\samples\BasicCard-Multiple-Forms-Apps\node_modules\@microsoft\rush-stack-compiler-4.5\node_modules\eslint\lib\linter\safe-emitter.js:45:58 at Array.forEach () at Object.emit (C:\Users**\Documents\Projects\Samples\sp-dev-fx-aces\samples\BasicCard-Multiple-Forms-Apps\node_modules\@microsoft\rush-stack-compiler-4.5\node_modules\eslint\lib\linter\safe-emitter.js:45:38) at NodeEventGenerator.applySelector (C:\Users**\Documents\Projects\Samples\sp-dev-fx-aces\samples\BasicCard-Multiple-Forms-Apps\node_modules\@microsoft\rush-stack-compiler-4.5\node_modules\eslint\lib\linter\node-event-generator.js:297:26) at NodeEventGenerator.applySelectors (C:\Users**\Documents\Projects\Samples\sp-dev-fx-aces\samples\BasicCard-Multiple-Forms-Apps\node_modules\@microsoft\rush-stack-compiler-4.5\node_modules\eslint\lib\linter\node-event-generator.js:326:22) at NodeEventGenerator.enterNode (C:\Users**\Documents\Projects\Samples\sp-dev-fx-aces\samples\BasicCard-Multiple-Forms-Apps\node_modules\@microsoft\rush-stack-compiler-4.5\node_modules\eslint\lib\linter\node-event-generator.js:340:14) at CodePathAnalyzer.enterNode (C:\Users**\Documents\Projects\Samples\sp-dev-fx-aces\samples\BasicCard-Multiple-Forms-Apps\node_modules\@microsoft\rush-stack-compiler-4.5\node_modules\eslint\lib\linter\code-path-analysis\code-path-analyzer.js:795:23) at C:\Users**\Documents\Projects\Samples\sp-dev-fx-aces\samples\BasicCard-Multiple-Forms-Apps\node_modules\@microsoft\rush-stack-compiler-4.5\node_modules\eslint\lib\linter\linter.js:1110:32

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to 'Windows PowerShell'
  2. Go to BasicCard-Multiple-Forms-Apps folder
  3. Type gulp serve
  4. See error

Environment Details (Development & Target environment)

a1mery commented 9 months ago

I cannot reproduce the issue on my side :( Have you tried removing all node modules and running again npm install after installing the correct version of Node.js ? Otherwise maybe this previous issue could help you: https://github.com/SharePoint/sp-dev-docs/issues/9006

dcashpeterson commented 9 months ago

@vdowney I was not able to reproduce the error either. In looking at the issue @a1mery linked to I am running V 1.17 of the generator so that could explain it. Let us know if this fixes the issue.

anoopt commented 9 months ago

@a1mery - Can you please let us know the node version you are using?

When I try to build the sample with the below versions, I am seeing the same error mentioned.

Project spfx-ace-forms version: 0.0.1 Build tools version: 3.17.19 Node version: v16.18.1

anoopt commented 9 months ago

@vdowney as mentioned in the issue shared by @a1mery, please run npm dedupe that should resolve the issue.

I no longer see the issue after running npm dedupe.

a1mery commented 9 months ago

@a1mery - Can you please let us know the node version you are using?

When I try to build the sample with the below versions, I am seeing the same error mentioned.

Project spfx-ace-forms version: 0.0.1 Build tools version: 3.17.19 Node version: v16.18.1

I'm using node v16.13.0

vdowney commented 9 months ago

Thank you, running "npm dedupe" resolved the issue.