Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure when using applicationinsights-web package #78840

Closed
RMacfarlane opened this issue Aug 9, 2019 · 2 comments
Closed

Build failure when using applicationinsights-web package #78840

RMacfarlane opened this issue Aug 9, 2019 · 2 comments
Assignees
Labels
vscode-build VS Code build process issues

Comments

@RMacfarlane
Copy link
Contributor

RMacfarlane commented Aug 9, 2019

With 803e140, I removed the a script tag for loading the applicationinsights-web package and instead switched to using an npm package for it. To get this to work, I had to alias the name of the package in workbench.js.

'applicationinsights-web': `${window.location.origin}/node_modules/@microsoft/applicationinsights-web/dist/applicationinsights-web.js`

The package is namespaced under @microsoft and has its own typings, but I found that compilation would fail with "Module not found" if explicit typings weren't provided in the typings folder for it. (And from the comments in the xterm typings, this seems to be from a limitation in the gulp-tsb library?). Having the typings in a subfolder (i.e. in an @microsoft folder) would also not work, so I changed the name to remove the namespace.

Build worked fine locally, but then failed for the optimize-vscode-reh-web task with a module not found error for applicationinsights-web:
https://dev.azure.com/monacotools/Monaco/_build/results?buildId=54106

We either need to be able to handle namespaced packages in the loader, or have some way of specifying an alias for the gulp task

cc @jrieken

@RMacfarlane RMacfarlane added the vscode-build VS Code build process issues label Aug 9, 2019
@jrieken
Copy link
Member

jrieken commented Aug 10, 2019

The package is namespaced under @microsoft and has its own typings, but I found that compilation would fail with "Module not found" if explicit typings weren't provided in the typings folder for it.

Yeah, that's on purpose. For performance reasons we tell TS (via gulp-tsb) not to look up files but use what's streamed to it instead. That's why we have the typings folder. Doesn't it work when you copy the d.ts-file into that folder?

@RMacfarlane
Copy link
Contributor Author

Yep, it does! 😄 I had the wrong module name in my declaration in the typings file 🙄

@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 26, 2019
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
vscode-build VS Code build process issues
Projects
None yet
Development

No branches or pull requests

2 participants