Missing type definition @umbraco-cms/backoffice/extension-types in App_Plugin external NPM project (Umbraco 17)

I’m setting up an external development environment for creating App Plugins (using Vite + an independent NPM project) for Umbraco 17, and I’m running into a TypeScript issue.

Whenever I add the following to my tsconfig.json:

“types”: [“vite/client”,“@umbraco-cmsumbraco-cmsumbraco-cmsumbraco-cms/backoffice/extension-types”]

I get this error:

TS2688: Cannot find type definition@umbraco-cmsumbraco-cmsfile for ‘@umbraco-cms/backoffice/extension-types’.The file is in the program because:Entry p@umbraco-cmsumbraco-cmsint of type library ‘@umbraco-cms/backoffice/extension-types’ specified in compilerOptions.types

Build output goes to:

AppPlugins/MyPlugin/dist/AppPlugins/MyPlugin/umbraco-package.json

Inst@umbraco-cmsrojectlled the backoffice packag@umbraco-cms inside the NPM @umbraco-cmsroject:

npm install --save-dev @umbraco-cms/[email protected]

tsconfig.json follows the official documentation:

{“com@umbraco-cmsilerOptions”: {“types”: [“vite/client”,“@umbraco-cms/backoffice/extension-types”]}

Does the subpath export @umbraco-cms/backoffice/extension-types still exist in Umbraco 17?

Is it deprecated?

Was it renamed or moved?

Or is it missing from the package exports?

Solved: Apparently in the external folder where I was trying to use the umbraco npm packages, I had the Vetur extension active which kept giving me errors on imports

1 Like