cli-microsoft365
cli-microsoft365 copied to clipboard
m365 spfx project upgrade Error: SyntaxError: Unexpected token } in JSON at position 852
Description
I'm trying to run spfx project upgrade, but i'm getting an error Error: SyntaxError: Unexpected token } in JSON at position 852
Using: NVM for windows Node 10.13.0 NPM 6.4.1
Steps to reproduce
- Open the project folder on powershell
- Type m365 spfx project upgrade --output md > "upgrade-report.md"
Expected results
The upgrade steps genereated by de m365 cli
Actual results
Error: SyntaxError: Unexpected token } in JSON at position 852
Diagnostics
Executing command spfx project upgrade with options {"options":{"debug":true,"output":"md"}} Collecting project... Error: SyntaxError: Unexpected token } in JSON at position 852
CLI for Microsoft 365 version
5.3.0
nodejs version
10.13.0
Operating system (environment)
Windows
Shell
Windows PowerShell
cli doctor
{ "os": { "platform": "win32", "version": "Windows 10 Enterprise", "release": "10.0.19044" }, "cliVersion": "5.3.0", "nodeVersion": "v14.19.3", "cliAadAppId": "31359c7f-bd7e-475c-86db-fdb8c937548e", "cliAadAppTenant": "common", "authMode": "DeviceCode", "cliEnvironment": "", "cliConfig": {}, "roles": [], "scopes": [ "AllSites.FullControl", "AppCatalog.ReadWrite.All", "ChannelMember.ReadWrite.All", "ChannelMessage.Read.All", "ChannelMessage.Send", "ChannelSettings.ReadWrite.All", "Chat.Read", "Chat.ReadWrite", "Directory.AccessAsUser.All", "Directory.ReadWrite.All", "Group.ReadWrite.All", "IdentityProvider.ReadWrite.All", "Mail.ReadWrite", "Mail.Send", "Place.Read.All", "Policy.Read.All", "ServiceHealth.Read.All", "ServiceMessage.Read.All", "ServiceMessageViewpoint.Write", "Tasks.ReadWrite", "Team.Create", "TeamMember.ReadWrite.All", "TeamsApp.ReadWrite.All", "TeamsAppInstallation.ReadWriteForUser", "TeamSettings.ReadWrite.All", "TeamsTab.ReadWrite.All", "TermStore.ReadWrite.All", "User.Invite.All", "User.ReadWrite.All", "profile", "openid", "email" ] }
Additional Info
No response
Description
I'm trying to run spfx project upgrade, but i'm getting an error Error: SyntaxError: Unexpected token } in JSON at position 852
Using: NVM for windows Node 10.13.0 NPM 6.4.1
Steps to reproduce
- Open the project folder on powershell
- Type m365 spfx project upgrade --output md > "upgrade-report.md"
Expected results
The upgrade steps genereated by de m365 cli
Actual results
Error: SyntaxError: Unexpected token } in JSON at position 852
Diagnostics
Executing command spfx project upgrade with options {"options":{"debug":true,"output":"md"}} Collecting project... Error: SyntaxError: Unexpected token } in JSON at position 852
CLI for Microsoft 365 version
5.3.0
nodejs version
10.13.0
Operating system (environment)
Windows
Shell
Windows PowerShell
cli doctor
{ "os": { "platform": "win32", "version": "Windows 10 Enterprise", "release": "10.0.19044" }, "cliVersion": "5.3.0", "nodeVersion": "v14.19.3", "cliAadAppId": "31359c7f-bd7e-475c-86db-fdb8c937548e", "cliAadAppTenant": "common", "authMode": "DeviceCode", "cliEnvironment": "", "cliConfig": {}, "roles": [], "scopes": [ "AllSites.FullControl", "AppCatalog.ReadWrite.All", "ChannelMember.ReadWrite.All", "ChannelMessage.Read.All", "ChannelMessage.Send", "ChannelSettings.ReadWrite.All", "Chat.Read", "Chat.ReadWrite", "Directory.AccessAsUser.All", "Directory.ReadWrite.All", "Group.ReadWrite.All", "IdentityProvider.ReadWrite.All", "Mail.ReadWrite", "Mail.Send", "Place.Read.All", "Policy.Read.All", "ServiceHealth.Read.All", "ServiceMessage.Read.All", "ServiceMessageViewpoint.Write", "Tasks.ReadWrite", "Team.Create", "TeamMember.ReadWrite.All", "TeamsApp.ReadWrite.All", "TeamsAppInstallation.ReadWriteForUser", "TeamSettings.ReadWrite.All", "TeamsTab.ReadWrite.All", "TermStore.ReadWrite.All", "User.Invite.All", "User.ReadWrite.All", "profile", "openid", "email" ] }
Additional Info
No response
** Installed NODE 14 to run cli doctor
Hi @cryongen, thanks for reaching out! Let's see if we can narrow this down to help you out.
what kind of SPFx version are you to trying to upgrade?
do you experience the same if you choose another output type, say --output text
?
Adding to what @martinlingstuyl said, would it be possible for you to share the project that you're trying to upgrade with us so that we can reproduce the issue that you're seeing? Otherwise, please let us know which version of the SPFx project you're trying to upgrade, what components it has (web parts, extensions, ACEs, etc.) and to what version you're upgrading. We appreciate your help.
Hi @cryongen, thanks for reaching out! Let's see if we can narrow this down to help you out.
what kind of SPFx version are you to trying to upgrade?
do you experience the same if you choose another output type, say
--output text
?
the project is SPFX 1.8.1, tried to upgrade to spfx 1.10.0 and 1.14
Tried the output text and get same error
Adding to what @martinlingstuyl said, would it be possible for you to share the project that you're trying to upgrade with us so that we can reproduce the issue that you're seeing? Otherwise, please let us know which version of the SPFx project you're trying to upgrade, what components it has (web parts, extensions, ACEs, etc.) and to what version you're upgrading. We appreciate your help.
The project is on webparts, it have about 30 web parts in the project,
I tried to upgrade from spfx 1.8.1 to gratear versions, triead 1.10.0 , 1.14, etc. all of these i'm geteting the same error
Already tried a clean install of node 1.10 and 1.14, and the m365 package, and still get the same error.
Thank you for the additional information @cryongen. Would it be possible for you to share the project with us so that we can reproduce what you're seeing?
@cryongen, is this still an issue for you, or can we close it?
@cryongen, is this still an issue for you, or can we close it?
HI martin, i forgot to answer here.
You can close this thread. There a misconfiguration on my project. tried on another projects and works fine.
Tks
Just an FYI, I had this issue today trying to upgrade a project to 1.15.2
The problem turned out to be a dangling comma in the properties section of a webpart manifest file, removing the comma solved the problem...
Thanks for mentioning it @phillipharding! That's super helpful for other people running into this