pnp/sp-dev-fx-extensions

react-command-print: Unable to package - issue with Typestyle

Closed this issue · 10 comments

Sample (which sample are you having trouble with)

React-command-print

Authors

Unknown

Expected or Desired Behavior

After pulling the latest, running npm install and then gulp bundle, solution should build with no errors

Observed Behavior

Two errors with module "typestyle":

[14:29:55] Error - [tsc] node_modules/typestyle/lib/index.d.ts(13,45): error TS1110: Type expected.
[14:29:55] Error - 'tsc' sub task errored after 2.9 s
exited with code 2
[14:29:55] 'bundle' errored after 3.35 s
[14:29:55]
[14:29:55] Finished subtask 'tslint' after 3.32 s
[14:29:55] ==================[ Finished ]==================
Error - [tsc] node_modules/typestyle/lib/index.d.ts(13,45): error TS1110: Type expected.
Error - 'tsc' sub task errored after 2.9 s
exited with code 2

Steps to Reproduce

  1. Pull repository
  2. npm install
  3. Gulp bundle

Environment Details (Development & Target environment)

OS: Windows 10
Target Environment: SharePoint Online
Node.js v8.17
Tooling VS Code

Additional context

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

Has anyone been able to reproduce this? @hugoabernier

You should try building the solution using gulp build before running gulp bundle.

Let us know if it helps?

Hi @hugoabernier - I get the same errors when I do a gulp build:

PS C:\PNP\sp-dev-fx-extensions-master\samples\react-command-print> gulp build
Build target: DEBUG
[21:06:28] Using gulpfile C:\PNP\sp-dev-fx-extensions-master\samples\react-command-print\gulpfile.js
[21:06:28] Starting gulp
[21:06:28] Starting 'build'...
[21:06:28] Starting subtask 'configure-sp-build-rig'...
[21:06:28] Finished subtask 'configure-sp-build-rig' after 6.14 ms
[21:06:28] Starting subtask 'pre-copy'...
[21:06:28] Finished subtask 'pre-copy' after 190 ms
[21:06:28] Starting subtask 'copy-static-assets'...
[21:06:28] Starting subtask 'sass'...
[21:06:28] Finished subtask 'sass' after 258 ms
[21:06:28] Starting subtask 'tslint'...
[21:06:28] [tslint] tslint version: 5.9.1
[21:06:28] Starting subtask 'tsc'...
[21:06:28] [tsc] typescript version: 2.4.2
[21:06:29] Finished subtask 'copy-static-assets' after 753 ms
[21:06:32] Error - [tsc] node_modules/typestyle/lib/index.d.ts(13,45): error TS1110: Type expected.
[21:06:32] Error - 'tsc' sub task errored after 3.98 s
exited with code 2
[21:06:32] 'build' errored after 4.73 s
[21:06:32]
[21:06:33] ==================[ Finished ]==================
Error - [tsc] node_modules/typestyle/lib/index.d.ts(13,45): error TS1110: Type expected.
Error - 'tsc' sub task errored after 3.98 s
exited with code 2
[21:06:33] Finished subtask 'tslint' after 4.9 s

Has anyone been able to reproduce this? @hugoabernier

Yes, I was able to reproduce the problem you're experiencing. It looks like the issue is with a package called typedstyle, which is used to create dynamic CSS classes for elements that do not accept a styles property and to create type-safe CSS.

Even after temporarily removing references to typedstyle, I have found that the extension does not seem to behave as expected; this appears to be largely due to breaking changes in the Fabric/Fluent CSS as it pertains to how popups and dialogs are rendered.

If you are the author of this sample and would like to provide an updated version of this sample, or if anyone else in the community would like to update this sample, we'd love your help.

Hi @ceaheart I was able to replicate the issue. Please try to install "typestyle": "^2.0.4" and try to build it. I tried and it worked. I think that there is some issue with that version. Please try and let us know.

Hi Everyone! Im curious if anyone else was able to try Sudharsank's fix and got their extension working? I am curious about the command you used to install typestyle 2.0.4. I finally used 'npm install --save "typestyle@^2.0.4"' to get something installed with no errors but still no joy for me. Also, this install did show up in the package.json file as "typestyle": "^2.1.0" so I feel like the package was installed correctly. Thoughts?

Closing this issue as stale. Would recommend mentioning the author of the sample next time, it may get their attention and increase the chances of getting a response.

Hi @AhmadiRamin or @VesaJuvonen can you help this issue still remain.

Hi everyone,

I wish you mentioned me earlier, I just saw this. Let me try to replicate the issue and will provide you a solution.