withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
44.06k stars 2.29k forks source link

`@astrojs/lit` - `Module '"astro"' has no exported member 'AstroIntegration'.` #10837

Closed trusktr closed 2 months ago

trusktr commented 2 months ago

Astro Info

I cloned the repo (2727370932197e2a84bc013b704bf1eb8e69e735),

Describe the Bug

I ran pnpm install, then inside of the packages/integrations/lit folder running npm run build results in errors:

lit git:main ❯ npm run build                                                                                                                    ✭

> @astrojs/lit@4.0.1 build
> astro-scripts build "src/**/*.ts" && tsc

src/index.ts:2:15 - error TS2305: Module '"astro"' has no exported member 'AstroIntegration'.

2 import type { AstroIntegration } from 'astro';
                ~~~~~~~~~~~~~~~~

src/index.ts:26:29 - error TS7031: Binding element 'updateConfig' implicitly has an 'any' type.

26    'astro:config:setup': ({ updateConfig, addRenderer, injectScript }) => {
                               ~~~~~~~~~~~~

src/index.ts:26:43 - error TS7031: Binding element 'addRenderer' implicitly has an 'any' type.

26    'astro:config:setup': ({ updateConfig, addRenderer, injectScript }) => {
                                             ~~~~~~~~~~~

src/index.ts:26:56 - error TS7031: Binding element 'injectScript' implicitly has an 'any' type.

26    'astro:config:setup': ({ updateConfig, addRenderer, injectScript }) => {
                                                          ~~~~~~~~~~~~

src/index.ts:45:28 - error TS7031: Binding element 'vite' implicitly has an 'any' type.

45    'astro:build:setup': ({ vite, target }) => {
                              ~~~~

src/index.ts:45:34 - error TS7031: Binding element 'target' implicitly has an 'any' type.

45    'astro:build:setup': ({ vite, target }) => {
                                    ~~~~~~

Found 6 errors in the same file, starting at: src/index.ts:2

npm ERR! Lifecycle script `build` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: @astrojs/lit@4.0.1 
npm ERR!   at location: /Users/trusktr/src/withastro+astro/packages/integrations/lit 

What's the expected result?

I expected to run the build script without any errors.

Link to Minimal Reproducible Example

n/a

Participation

trusktr commented 2 months ago

Oh duh, because I need to build astro in the root first. 🤣