0

When using Dialog class from sp-dialog, gulp serve throws the error.

Created an SPFX project with react framework. installed sp-dialog with the following command.

npm install --save

in the .tsx file, I used the following lines of code.

import { Dialog } from '@microsoft/sp-dialog';

Dialog.alert('Hello world');

When use gulp serve or gulp build, the following error is thrown.

Error - typescript - node_modules@microsoft\sp-dialog\node_modules@microsoft\sp-core-library\lib\deferredClass\DeferredClass.d.ts(25,24): error TS1005: ';' expected.

2
  • The error is throwing at the following line. export default abstract class DeferredClass<Type, Instance> {
    – Sree
    Mar 26, 2018 at 5:38
  • the abstract is causing the issue. Any thoughts?
    – Sree
    Mar 26, 2018 at 5:42

1 Answer 1

0

Late, I know, but there's a solution here: https://blog.mastykarz.nl/temporary-workaround-sharepoint-framework-dialogs/

Use

import { Dialog } from '@microsoft/sp-dialog/lib';

instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.