This repository was archived by the owner on Apr 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
docs/content/1.getting-started
packages/nuxi/src/commands Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,15 @@ npm install
74
74
```
75
75
76
76
``` bash [pnpm]
77
- pnpm install --shamefully-hoist
77
+ pnpm install
78
78
```
79
79
80
80
::
81
81
82
+ :: alert
83
+ ** Note:** If using ** pnpm** , make sure to have ` .npmrc ` with ` shamefully-hoist=true ` inside it before ` pnpm install ` .
84
+ ::
85
+
82
86
## Development Server
83
87
84
88
Now you'll be able to start your Nuxt app in development mode:
Original file line number Diff line number Diff line change
1
+ import { writeFile } from 'node:fs/promises'
1
2
import { downloadTemplate , startShell } from 'giget'
2
3
import { relative } from 'pathe'
3
4
import consola from 'consola'
@@ -27,9 +28,16 @@ export default defineNuxtCommand({
27
28
28
29
// Show next steps
29
30
const relativeDist = rpath ( t . dir )
31
+
32
+ // Write .nuxtrc with `shamefully-hoist=true` for pnpm
33
+ const usingPnpm = ( process . env . npm_config_user_agent || '' ) . includes ( 'pnpm' )
34
+ if ( usingPnpm ) {
35
+ await writeFile ( `${ relativeDist } /.npmrc` , 'shamefully-hoist=true' )
36
+ }
37
+
30
38
const nextSteps = [
31
39
! args . shell && relativeDist . length > 1 && `\`cd ${ relativeDist } \`` ,
32
- 'Install dependencies with `npm install` or `yarn install` or `pnpm install --shamefully-hoist `' ,
40
+ 'Install dependencies with `npm install` or `yarn install` or `pnpm install`' ,
33
41
'Start development server with `npm run dev` or `yarn dev` or `pnpm run dev`'
34
42
] . filter ( Boolean )
35
43
You can’t perform that action at this time.
0 commit comments