atinux / content-wind

A lightweight Nuxt theme to build a Markdown driven website. Powered by Nuxt Content, TailwindCSS and Iconify.
https://content-wind.nuxt.space
MIT License
791 stars 55 forks source link

pnpm issue #4

Closed wobsoriano closed 2 years ago

wobsoriano commented 2 years ago

Pnpm version: 7.1.2

~/tmp/docs-test via  v16.14.2
❯ pnpm install --shamefully-hoist
~/tmp/docs-test via  v16.14.2 took 10s
❯ pnpm dev

> @ dev /Users/yesyes/tmp/docs-test
> nuxi dev
Nuxt CLI v3.0.0-rc.3                                                                              07:18:56
                                                                                                  07:18:56
  > Local:    http://localhost:3000/
  > Network:  http://192.168.1.13:3000/

✔ Using ~/components/content for components in Markdown                             @nuxt/content 07:19:00
ℹ Using default Tailwind CSS file from runtime/tailwind.css                      nuxt:tailwindcss 07:19:00
ℹ Merging Tailwind config from ~/tailwind.config.js                              nuxt:tailwindcss 07:19:00
ℹ Tailwind Viewer: http://localhost:3000/_tailwind/                              nuxt:tailwindcss 07:19:00
ℹ Vite server warmed up in 582ms                                                                  07:19:03
ℹ Vite client warmed up in 2660ms                                                                 07:19:03
✔ Vite server built in 2000ms                                                                     07:19:05
✔ Nitro built in 1317 ms                                                                    nitro 07:19:06
TypeError [ERR_PACKAGE_IMPORT_NOT_DEFINED]: Package import specifier "#imports" is not defined in package /Users/yesyes/tmp/docs-test/node_modules/.pnpm/@nuxt+content-edge@2.0.0-27555126.58f2d50/node_modules/@nuxt/content-edge/package.json imported from /Users/yesyes/tmp/docs-test/node_modules/.pnpm/@nuxt+content-edge@2.0.0-27555126.58f2d50/node_modules/@nuxt/content-edge/dist/runtime/components/ContentDoc.mjs
    at new NodeError (node:internal/errors:371:5)
    at throwImportNotDefined (node:internal/modules/esm/resolve:442:9)
    at packageImportsResolve (node:internal/modules/esm/resolve:819:3)
    at moduleResolve (node:internal/modules/esm/resolve:973:21)
    at defaultResolve (node:internal/modules/esm/resolve:1080:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
    at link (node:internal/modules/esm/module_job:78:36) {
  code: 'ERR_PACKAGE_IMPORT_NOT_DEFINED'
}
atinux commented 2 years ago

Can you confirm it works well with Yarn though?

wobsoriano commented 2 years ago

With yarn

 ERROR  [worker reload] [worker init] Cannot find module '/Users/yesyes/tmp/docs-test/node_modules/node-fetch-native/dist/polyfill.mjs' imported from /Users/yesyes/tmp/docs-test/.nuxt/dev/index.mjs
atinux commented 2 years ago

Try to remove your .nuxt

wobsoriano commented 2 years ago

Try to remove your .nuxt

This fixes yarn thanks

atinux commented 2 years ago

Removing pnpm for now, thanks for the report @wobsoriano

wobsoriano commented 2 years ago

No idea if it's related to pnpm v7+ but I'll comment an update here