microsoft / windows-admin-center-sdk

SDK including documentation and sample code for developing extensions for Windows Admin Center (previously Project Honolulu)
Other
119 stars 51 forks source link

Examples do not build with gulp #44

Closed altrhombus closed 5 years ago

altrhombus commented 5 years ago

Issue: examples, such as FormTest, do not build with gulp

(Disclaimer: I'm new to this, so user error is extremely likely)

Steps to Reproduce:

  1. Prepare environment per https://docs.microsoft.com/en-us/windows-server/manage/windows-admin-center/extend/prepare-development-environment
  2. Clone sdk repo, cd to Examples\FormTest
  3. Run npm install
  4. Run gulp build

Environment: windows-admin-center-sdk: 1.278.0 windows-admin-center-cli: 0.1.26

Output:

PS .\Examples\FormTest> gulp build
[18:03:19] Using gulpfile .\Examples\FormTest\gulpfile.js
[18:03:19] Starting 'build'...
[18:03:19] Starting 'clean'...
[18:03:19] Finished 'clean' after 44 ms
[18:03:19] Starting 'generate'...
[18:03:19] Starting 'generate-powershell'...
[18:03:19] Starting 'generate-svg'...
[18:03:19] Starting 'generate-resjson'...
[18:03:19] Starting 'generate-resjson-json'...
[18:03:19] Starting 'generate-resjson-interface'...
(node:3784) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[18:03:19] Finished 'generate-resjson-json' after 25 ms
[18:03:19] Finished 'generate-resjson-interface' after 25 ms
[18:03:19] Starting 'merge-localized-json'...
[18:03:19] Finished 'generate-svg' after 38 ms
[18:03:19] Finished 'merge-localized-json' after 6.72 ms
[18:03:19] Finished 'generate-resjson' after 39 ms
[18:03:19] Finished 'generate-powershell' after 58 ms
[18:03:19] Finished 'generate' after 60 ms
[18:03:19] Starting 'lint'...
[18:03:23] Finished 'lint' after 3.6 s
[18:03:23] Starting 'inline'...
[18:03:23] Finished 'inline' after 191 ms
[18:03:23] Starting 'compile'...
[18:03:23] Starting 'copy'...
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/rpc/rpc-base.d.ts:158:13: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/rpc/rpc-base.d.ts:161:15: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/rpc/rpc-base.d.ts:161:33: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/security/authorization-manager.d.ts:60:17: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/security/authorization-manager.d.ts:61:30: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/security/authorization-manager.d.ts:76:17: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/security/authorization-manager.d.ts:166:71: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/data/disposable.d.ts:10:42: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:37:18: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:94:53: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:160:23: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:257:21: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:279:17: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:482:14: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:498:9: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:499:11: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:543:31: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:547:29: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:555:36: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:559:34: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/manifest/environment-modules.d.ts:620:14: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/security/connection.d.ts:5:47: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/security/connection.d.ts:11:43: Initializers are not allowed in ambient contexts.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/security/connection.d.ts:12:36: Initializers are not allowed in ambient contexts.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/security/connection.d.ts:13:43: Initializers are not allowed in ambient contexts.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/security/connection.d.ts:14:44: Initializers are not allowed in ambient contexts.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/data/websocket-stream.d.ts:99:14: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/base/json.d.ts:13:37: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/data/asset-manager.d.ts:15:39: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/data/powershell-alternate.d.ts:14:39: Initializers are not allowed in ambient contexts.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/dom/dom.d.ts:163:57: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/shared/cluster-inventory/cluster-inventory.d.ts:64:14: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/shared/cluster-inventory/cluster-inventory.d.ts:126:14: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/data/extension-broker/model/extension-broker-response-payload.d.ts:71:49: Cannot find namespace 'MsftSme'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/data/extension-broker/model/extension-instance.d.ts:15:18: Cannot find name 'DOMRect'.
Error at ./FormTest/node_modules/@microsoft/windows-admin-center-sdk/core/data/extension-broker/model/extension-broker-request-payload.d.ts:95:11: Cannot find name 'DOMRect'.
Error at ./FormTest/inlineSrc/app/app-routing.module.ts:3:31: Cannot find module '@microsoft/windows-admin-center-sdk/angular'.
Error at ./FormTest/inlineSrc/app/app.component.ts:2:76: Cannot find module '@microsoft/windows-admin-center-sdk/angular'.
Error at ./FormTest/inlineSrc/app/app.module.ts:18:8: Cannot find module '@microsoft/windows-admin-center-sdk/angular'.
Error at ./FormTest/inlineSrc/app/default/default.module.ts:5:32: Cannot find module '@microsoft/windows-admin-center-sdk/angular'.
[18:03:32] 'compile' errored after 9.05 s
[18:03:32] Error in plugin 'gulp-ngc'
Message:
    Compilation error.
See details in the ngc output
Details:
    fileName: .\FormTest\tsconfig-inline.json
[18:03:32] 'build' errored after 13 s
[18:03:32] Error in plugin 'run-sequence(compile)'
Error
    at finish (.\FormTest\node_modules\run-sequence\index.js:81:12)
    at Gulp.onError (.\FormTest\node_modules\run-sequence\index.js:92:3)
    at Gulp.emit (events.js:194:15)
    at Gulp.Orchestrator._emitTaskDone (.\FormTest\node_modules\orchestrator\index.js:264:8)
    at .\FormTest\node_modules\orchestrator\index.js:275:23
    at finish (.\FormTest\node_modules\orchestrator\lib\runTask.js:21:8)
    at DestroyableTransform.<anonymous> (.\FormTest\node_modules\orchestrator\lib\runTask.js:52:4)
    at DestroyableTransform.f (.\FormTest\node_modules\orchestrator\node_modules\once\once.js:17:25)
    at DestroyableTransform.emit (events.js:194:15)
    at onwriteError (.\FormTest\node_modules\readable-stream\lib\_stream_writable.js:449:12)
[18:03:32] Finished 'copy' after
altrhombus commented 5 years ago

(Update: new projects build successfully when built with windows-admin-center-cli@0.1.27--thank you!)

alexanderboswell commented 5 years ago

We have updated the examples. Thanks for letting us know about this issue!