Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error - [lint] Unexpected STDERR output from ESLint: Oops! Something went wrong! :( ESLint: 8.7.0 TypeError: Cannot read properties of undefined (reading 'getFirstToken') #9006

Closed
1 of 9 tasks
srkcode10 opened this issue Jun 12, 2023 · 6 comments
Labels
area:spfx Category: SharePoint Framework (not extensions related) Needs: Author Feedback Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days. no-recent-activity Stale issue due to lack of activity. Closed after 7 days with no activity by OP. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@srkcode10
Copy link

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
  • SPFx version
  • Node.js version
  • etc

PS C:\WINDOWS\system32> npm list -g --depth 0
C:\Users\user1\AppData\Roaming\npm
+-- @angular/cli@15.2.4
+-- @microsoft/generator-sharepoint@1.16.1
+-- @pnp/cli-microsoft365@3.11.0
+-- @types/jquery@2.0.48
+-- bower@1.8.8
+-- create-react-app@3.4.1
+-- gulp-cli@2.3.0
+-- nodemon@1.19.1
+-- npm-install-peers@1.2.2
+-- npm@9.7.1
+-- react@16.8.6
+-- typescript@4.1.5
+-- windows-build-tools@5.2.2
`-- yo@4.3.1

Describe the bug / error

The error occurs while running the gulp build or gulp serve command from the terminal.

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:/SPODev/LBOApp/src/webparts/lboCalc/components/LboCalc.tsx:6
Rule: "@typescript-eslint/no-extra-semi"
at ClassBody (C:/SPODev/LBOApp/node_modules/eslint/lib/rules/no-extra-semi.js:112:52)
at ruleErrorHandler (C:/SPODev/LBOApp/node_modules/@microsoft/rush-stack-compiler-4.5/node_modules/eslint/lib/linter/linter.js:1079:28)
at C:/SPODev/LBOApp/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:/SPODev/LBOApp/node_modules/@microsoft/rush-stack-compiler-4.5/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (C:/SPODev/LBOApp/node_modules/@microsoft/rush-stack-compiler-4.5/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
at NodeEventGenerator.applySelectors (C:/SPODev/LBOApp/node_modules/@microsoft/rush-stack-compiler-4.5/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
at NodeEventGenerator.enterNode (C:/SPODev/LBOApp/node_modules/@microsoft/rush-stack-compiler-4.5/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
at CodePathAnalyzer.enterNode (C:/SPODev/LBOApp/node_modules/@microsoft/rush-stack-compiler-4.5/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:795:23)
at C:/SPODev/LBOApp/node_modules/@microsoft/rush-stack-compiler-4.5/node_modules/eslint/lib/linter/linter.js:1110:32

Error - [lint]

Steps to reproduce

PS C:\SPODev> yo @microsoft/sharepoint

 _-----_     ╭──────────────────────────╮
|       |    │      Welcome to the      │
|--(o)--|    │  SharePoint Online SPFx  │

---------´ │ Yeoman Generator@1.16.1 │ ( _´U_ ) ╰──────────────────────────╯
/A\ /
| ~ |
'..'_
´ |° ´ Y

See https://aka.ms/spfx-yeoman-info for more information on how to use this generator.
Let's create a new SharePoint solution.
? What is your solution name? Test1
? Which type of client-side component to create? WebPart
Add new Web part to solution test-1.
? What is your Web part name? TestApp
? Which template would you like to use? React

Hit enter and NPM Install will start.

Expected behavior

The app should open in the workbench or the gulp build command should complete successfully.

@srkcode10 srkcode10 added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Jun 12, 2023
@ghost
Copy link

ghost commented Jun 12, 2023

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 Awaiting categorization and initial review. label Jun 12, 2023
@AJIXuMuK
Copy link
Collaborator

@srkcode10 - could you please update spfx generator to the latest version (1.17.3) and try again?
If the error is still a repro - could you please run npn dedupe and see if that fixes it?

Thanks!

@AJIXuMuK AJIXuMuK added area:spfx Category: SharePoint Framework (not extensions related) Needs: Author Feedback Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days. and removed Needs: Triage 🔍 Awaiting categorization and initial review. labels Jun 12, 2023
@timdhahn
Copy link

I'm also having the this same issue with spfx 1.16.1.

Updating to 1.17.3 resolves this eslint error. However, I don't recall seeing this error when I first scaffolded to test webparts in 1.16.1. Could something have introduced this issued in a transitive dependency?

@AJIXuMuK
Copy link
Collaborator

@timdhahn - yep, that is exactly what happened.

@ghost ghost added the no-recent-activity Stale issue due to lack of activity. Closed after 7 days with no activity by OP. label Jun 20, 2023
@ghost
Copy link

ghost commented Jun 20, 2023

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within the next 7 days of this comment. Please see our wiki for more information: Issue List Labels: Needs Author Feedback & Issue List: No response from the original issue author

@ghost ghost closed this as completed Jun 27, 2023
@ghost
Copy link

ghost commented Jun 27, 2023

Closing issue due to no response from the original author. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: No response from the original issue author

@ghost ghost locked and limited conversation to collaborators Jun 27, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:spfx Category: SharePoint Framework (not extensions related) Needs: Author Feedback Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days. no-recent-activity Stale issue due to lack of activity. Closed after 7 days with no activity by OP. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

3 participants