File tree Expand file tree Collapse file tree 9 files changed +421
-566
lines changed
playground/server/api/browser
runtime/browser/server/utils Expand file tree Collapse file tree 9 files changed +421
-566
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,11 @@ NuxtHub AI is compatible with some functions of the [Vercel AI SDK](https://sdk
169169Make sure to install the Vercel AI SDK in your project.
170170
171171``` [Terminal]
172- npx ni ai @ai-sdk/vue
172+ npx nypm i ai @ai-sdk/vue
173173```
174174
175175:: note
176- [ ` ni ` ] ( https://github.com/antfu/ni ) will detect your package manager and install the dependencies with it.
176+ [ ` nypm ` ] ( https://github.com/unjs/nypm ) will detect your package manager and install the dependencies with it.
177177::
178178
179179### ` useChat() `
Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ export default defineNuxtConfig({
1919Lastly, install the required dependencies by running the following command:
2020
2121``` bash [Terminal]
22- npx ni @cloudflare/puppeteer puppeteer
22+ npx nypm i @cloudflare/puppeteer puppeteer
2323```
2424
2525:: note
26- [ ni ] ( https://github.com/antfu/ni ) will automatically detect the package manager you are using and install the dependencies.
26+ [ nypm ] ( https://github.com/unjs/nypm ) will automatically detect the package manager you are using and install the dependencies.
2727::
2828
2929## Usage
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ The module ensures that you can connect to your PostgreSQL database using [Cloud
31312 . Install the [ ` postgres ` ] ( https://www.npmjs.com/package/postgres ) NPM package in your project.
3232
3333``` bash
34- npx ni postgres
34+ npx nypm i postgres
3535```
3636
3737:: tip { icon =" i-ph-rocket-launch " }
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export default defineNuxtConfig({
40403 . Install the required dependencies
4141
4242``` bash [Terminal]
43- npx ni @cloudflare/puppeteer puppeteer
43+ npx nypm i @cloudflare/puppeteer puppeteer
4444```
4545
46464 . Start using [ ` hubBrowser() ` ] ( /docs/features/browser ) in your server routes
Original file line number Diff line number Diff line change 4949 "h3" : " ^1.12.0" ,
5050 "mime" : " ^4.0.4" ,
5151 "nitro-cloudflare-dev" : " ^0.1.6" ,
52+ "nuxthub" : " ^0.5.18" ,
5253 "ofetch" : " ^1.3.4" ,
5354 "pathe" : " ^1.1.2" ,
5455 "pkg-types" : " ^1.2.0" ,
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export default cachedEventHandler(async (event) => {
1818 title : document . title ,
1919 description : getMetaContent ( 'description' ) || getMetaContent ( 'og:description' ) ,
2020 favicon : document . querySelector ( 'link[rel="shortcut icon"]' ) ?. href
21- || document . querySelector ( 'link[rel="icon"]' ) ?. href ,
21+ || document . querySelector ( 'link[rel="icon"]' ) ?. href ,
2222 ogImage : getMetaContent ( 'og:image' ) ,
2323 origin : document . location . origin
2424 }
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ export async function setupBrowser(nuxt: Nuxt) {
124124 }
125125 }
126126 if ( missingDeps . length > 0 ) {
127- console . error ( `Missing dependencies for \`hubBrowser()\`, please install with:\n\n\`npx ni ${ missingDeps . join ( ' ' ) } \`` )
127+ console . error ( `Missing dependencies for \`hubBrowser()\`, please install with:\n\n\`npx nypm i ${ missingDeps . join ( ' ' ) } \`` )
128128 process . exit ( 1 )
129129 }
130130 // Add Server scanning
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ async function getPuppeteer() {
130130 const _pkg = 'puppeteer' // Bypass bundling!
131131 _puppeteer = ( await import ( _pkg ) . catch ( ( ) => {
132132 throw new Error (
133- 'Package `puppeteer` not found, please install it with: `npx ni puppeteer`'
133+ 'Package `puppeteer` not found, please install it with: `npx nypm i puppeteer`'
134134 )
135135 } ) )
136136 } else {
You can’t perform that action at this time.
0 commit comments