Skip to content

Bug report: spo site add - --lcid 2057 error #1728

@MistaTwist

Description

@MistaTwist

Description

I found that the following locale id for en-GB, 2057, in spo site add throws an error:

o365 spo site add --title "[siteName]" --type TeamSite --alias "[SiteNameAlias]" --lcid 2057

It appears to be due to the lcid, as with it, or using 1033 for en-US, it worked fine.

Steps to reproduce

o365 spo site add --title "[siteName]" --type TeamSite --alias "[SiteNameAlias]" --lcid 2057

Expected result

A new Teamsite to be created with regional settings configured to be English - United Kingdom

Actual result

Error:

(node:9944) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object
at Function.getOwnPropertyNames ()
at Function.logOutput (C:\Users\Paul.Perry\AppData\Roaming\npm\node_modules@pnp\office365-cli\dist\Utils.js:150:20)
at UI.vorpal.pipe [as _pipeFn] (C:\Users\Paul.Perry\AppData\Roaming\npm\node_modules@pnp\office365-cli\dist\index.js:126:32)
at UI.log (C:\Users\Paul.Perry\AppData\Roaming\npm\node_modules@pnp\office365-cli\node_modules\vorpal\dist\ui.js:436:48)
at Session.session._log (C:\Users\Paul.Perry\AppData\Roaming\npm\node_modules@pnp\office365-cli\node_modules\vorpal\dist\session.js:93:24)
at Session.session.log (C:\Users\Paul.Perry\AppData\Roaming\npm\node_modules@pnp\office365-cli\node_modules\vorpal\dist\session.js:78:20)
at CommandInstance.log (C:\Users\Paul.Perry\AppData\Roaming\npm\node_modules@pnp\office365-cli\node_modules\vorpal\dist\command-instance.js:94:26)
at getSpoUrl.then.then (C:\Users\Paul.Perry\AppData\Roaming\npm\node_modules@pnp\office365-cli\dist\o365\spo\commands\site\site-add.js:152:25)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9944) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9944) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Environment

Windows 10
PowerShell Integrated shell in VsCode v1.47.2
cli version 2.13.0-beta.98e4af8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions