Code Monkey home page Code Monkey logo

vitesse-nuxt3's People

Contributors

antfu avatar arbust908 avatar atinux avatar azuradara avatar bogdanciuca avatar cinob avatar evanlong0803 avatar johannschopplich avatar lmmmmmm-bb avatar lotwt avatar lstegger avatar oumarbarry avatar portlek avatar rinatmadreiter avatar rogepi avatar takkiraz avatar userquin avatar yufanzheng0723 avatar yunyoujun avatar yuyinws avatar yzh990918 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vitesse-nuxt3's Issues

Bulid and deploy in docker failed with exit code 134.

error:

Snipaste_2022-07-15_10-42-46

windows10

node version 16.15.1

Dockerfile:

FROM node:16.15.1
COPY . .

RUN npm config set registry https://registry.npm.taobao.org --global
RUN npm install -g pnpm
RUN pnpm install
RUN pnpm run build
RUN npm install -g pm2

EXPOSE 3000

CMD [ "pm2-runtime", "start", ".output/server/index.mjs" ]

.dockerignore:

node_modules
.output
.nuxt

pnpm build & pnpm start are running properly in the local environment

Demo error

{
errorType: "Runtime.ImportModuleError",
errorMessage: "Error: Cannot find module 'node:http'
Require stack:

  • /var/task/.netlify/functions-internal/server/server.js
  • /var/task/server.js
  • /var/runtime/UserFunction.js
  • /var/runtime/index.js",
    trace: [
    "Runtime.ImportModuleError: Error: Cannot find module 'node:http'",
    "Require stack:",
    "- /var/task/.netlify/functions-internal/server/server.js",
    "- /var/task/server.js",
    "- /var/runtime/UserFunction.js",
    "- /var/runtime/index.js",
    " at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
    " at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
    " at Object. (/var/runtime/index.js:43:30)",
    " at Module._compile (internal/modules/cjs/loader.js:999:30)",
    " at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)",
    " at Module.load (internal/modules/cjs/loader.js:863:32)",
    " at Function.Module._load (internal/modules/cjs/loader.js:708:14)",
    " at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)",
    " at internal/main/run_main_module.js:17:47"
    ]
    }

CSS style missing

Go to the 404 page by entering the url where the route does not exist, and then click the back btn. When the page jumps, the CSS style will be lost for a moment.


But in the Online Preview of this repository it is normal.I just clone it, install and run

yaml file in .output-folder

For running a node app at my hoster I need a yaml-file in the .output folder.
How to ensure that this file won't be deleted on each "npm run build"?
If putting it to /public its deployed to /.output/public - but I need it in /.output

EDIT: I was wrong - but can not delete this message

希望集成 husky 和 windcss

Clear and concise description of the problem

希望集成 husky 和 windcss

Suggested solution

希望集成 husky 和 windcss

Alternative

No response

Additional context

No response

Validations

The requested module 'vue' does not provide an export named 'default'

Describe the bug

The current state of the repo is broken with the error:

The requested module 'vue' does not provide an export named 'default'

at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:527:24)

Reproduction

https://stackblitz.com/github/antfu/vitesse-nuxt3

System Info

OS: Windows 10 10.0.19044
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 15.85 GB / 31.90 GB
  Binaries:
    Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.17 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.50)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Nuxi 3.0.0-rc.13 版本 NuxtLink 切换页面路由失效

Describe the bug

bug 重现分支
https://gitee.com/cestr/bsc-geega-web/tree/1.0.0-stage-1%2Fdevelop/
正常分支 "nuxt": "^3.0.0-rc.11",
https://gitee.com/cestr/bsc-geega-web/tree/1.0.0-stage-1%2Fmain/

Reproduction

https://gitee.com/cestr/bsc-geega-web/tree/1.0.0-stage-1%2Fdevelop/

System Info

OS:Windows 10 22H2
Edge: 107
Node: 16.18.0
npm: 8.19.2 
pnpm: 7.14.1

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

latest nuxt3 not working

cloning the repo and installing deps will update to use latest version with this error, it seems nuxt3 not fully compatible with pnpm:

error with nuxt3 3.0.0-27428764.271289c
exports is not defined                                                                                                 
  at $id_56a97886 (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:130:23)            
  at __instantiateModule__ (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:24647:9)  
  at __ssrLoadModule__ (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:24594:25)     
  at ssrImport (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:24619:13)
  at $id_39fc60f4 (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:32:37)
  at __instantiateModule__ (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:24647:9)
  at __ssrLoadModule__ (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:24594:25)
  at ssrImport (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:24619:13)
  at ssrDynamicImport (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:24630:12)
  at file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:10:31
m.default is not a function
  at file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/dist/server/server.mjs:10:185
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  at async renderToString (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/node_modules/.pnpm/[email protected]/node_modules/vue-bundle-renderer/dist/index.mjs:247:19)
  at async renderMiddleware (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/.nuxt/nitro/index.mjs:206:20)
  at async handle (file:///F:/work/projects/quini/nuxt3/nuxt3-vuetify3/node_modules/.pnpm/[email protected]/node_modules/h3/dist/index.mjs:601:19)

using previous version just works:

devDependencies:
- nuxt3 3.0.0-27428764.271289c
+ nuxt3 3.0.0-27393784.b110c8c (3.0.0-27428764.271289c is available)

strange behavior: visual errors in 'index.vue' but not in others.

Exactly same code, both working nice, but visual errors in 'index' file.

Reproduction:

  • Install vitesse-nuxt3
  • Open index.vue

index.vue
Code_5UMoY6VOya

query.vue
Code_Wt9E50SASR

My VSCode config:

{
  "code-runner.runInTerminal": true,
  "workbench.iconTheme": "material-icon-theme",
  "workbench.editorAssociations": {
    "*.ipynb": "jupyter-notebook"
  },
  "workbench.colorTheme": "Sublime Material Theme - Dark",
  "editor.formatOnSave": true,
  "explorer.confirmDragAndDrop": false,
  "tabnine.experimentalAutoImports": true,
  "[json]": {
    "editor.defaultFormatter": "HookyQR.beautify"
  },
  "notebook.cellToolbarLocation": {
    "default": "right",
    "jupyter-notebook": "left"
  },
  "files.associations": {
    "*.pl": "prolog"
  },
  "css.validate": false,
  "gitlens.hovers.currentLine.over": "line",
  "git.terminalAuthentication": false,
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "emmet.includeLanguages": {
    "vue": "html",
    "jsx": "html"
  },
  "vetur.experimental.templateInterpolationService": true,
  "editor.inlineSuggest.enabled": true,
  "github.copilot.enable": {
    "*": true,
    "yaml": false,
    "plaintext": false,
    "markdown": true
  }
  // "vetur.validation.interpolation": false
}

tsconfig.json:

{
  "extends": "./.nuxt/tsconfig.json",
  "compilerOptions": {
    "strict": true
  }
}

After I pnpm dev......

[nuxt] [request error] Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'e:'
at new NodeError (node:internal/errors:371:5)
at defaultResolve (node:internal/modules/esm/resolve:1016:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
at ModuleWrap. (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36)

"jsx" error in Counter.vue

Describe the bug

The error Cannot use JSX unless the '--jsx' flag is provided. ts(17004) is present in src/components/Conter.vue file.

Extensions: Eslint, Prettier, Typescript Vue Plugin (Volar), Vue Language Features, WindiCSS Intellisense.

A possible fix is to add "jsx": "preserve" to compilerOptions in tsconfig.json.

Reproduction

clone the template, run pnpm i, go to src/components/Conter.vue to see the errror

System Info

System:
    OS: macOS 12.3.1
    CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
    Memory: 155.01 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    npm: 8.5.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 103.0.5060.114
    Firefox: 101.0.1
    Safari: 15.4

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

color mode does not store in the session.

to reproduce that:

  • go to the home page
  • click the changing color mode button
  • write your name to InputEntry
  • click the GO button

then you will see the old color mode state does not come with.
maybe we can use store.ts for it? idk.

ESM Syntax error on build

When build on vercel get error

ERROR [nuxt] [request error] Directory import '/var/task/node_modules/@heroicons/vue/outline' is not supported resolving ES modules imported from /var/task/chunks/app/server.mjs

I think it have something to do with CommonJS (CJS) support. How this can be fixed?

Icons from Uno does not generat for object

When I use object with icons to generate html in for loop icons does not show up.
If I use the same item directly on page it shows up in both use places.

How do I force icons to be added to generates css?

Nuxt ^3.4.0 版本,VueUse useColorMode 方法切换主题模式失效

Describe the bug

今天升级 nuxt 3.4 后,发现使用的 useColorMode 失效,不能修改 <html class='light'>
来到 vitesse-nuxt3 仓库看 commit log 也已经更新了 3.4,下载code,run后,也是失效的。
在线的 https://vitesse-nuxt3.netlify.app/ 也没有效果。

bug

Reproduction

https://vitesse-nuxt3.netlify.app/

System Info

OS:Windows 10 22H2
Node: 18.12.0
npm: 8.19.2 
pnpm: 7.21.0

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Update @antfu/eslint-config to make defined globals from nuxt works

Clear and concise description of the problem

I guess it's more a @antfu/eslint-config issue, but since it's Nuxt 3 related and i'm not sure it make sense I will post it here.

Capture d’écran 2023-02-10 à 17 32 16

As show on the screenshot defineEventHandler isn't found, even if auto imported is a "standard".

Suggested solution

I tried to extends with differents nuxt3 specific eslint. Unfortunally adding them on top of your config break eslint.
I guess it would be better to just make it works on your config - then no other eslint dep is needed.

Alternative

No response

Additional context

No response

Validations

'nuxt dev' 500s on a fresh install with ssr: false

Environment

  • Operating System: macOS Monterey
  • Node Version: v16.13.1
  • Nuxt Version: 3.0.0-rc.3
  • Package Manager: pnpm@7
  • Builder: vite
  • User Config: ssr

Logs

useState@http://localhost:3000/_nuxt/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/composables/state.mjs:7:26 @http://localhost:3000/_nuxt/node_modules/.pnpm/@[email protected]/node_modules/@nuxtjs/color-mode/dist/runtime/plugin.client.mjs:7:29 fn@http://localhost:3000/_nuxt/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/nuxt.mjs:106:27 callWithNuxt@http://localhost:3000/_nuxt/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/nuxt.mjs:111:12 applyPlugin@http://localhost:3000/_nuxt/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/nuxt.mjs:68:29 applyPlugins@http://localhost:3000/_nuxt/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/nuxt.mjs:77:11 async*initApp@http://localhost:3000/_nuxt/entry.mjs:44:13 @http://localhost:3000/_nuxt/entry.mjs:60:3

Seems lie a problem with @nuxtjs/color-mode package (related)

Result

image

Runtime compiler

Hello @antfu

Again, this is a great template! I've been playing with it for my personal website, but now I want to give it a go with something more advanced.

Now I'm trying to have the runtime compiler both in server and client. I do this because I use Laravel to get pages/partials already with translated content and permission-based content ready from the backend.
I'm trying to use https://github.com/mattelen/vue3-runtime-template (it works with webpack)

Is it too hard to have the runtime compiler with vitesse-nuxt3?

Right now, it works out of the box, server-side.

image

    <div>
      Foo bar
      <v-runtime-template :template="template"></v-runtime-template>
    </div>

  </section>
</template>

<script>
import VRuntimeTemplate from "vue3-runtime-template"

export default {
  components: { VRuntimeTemplate },
  data: () => ({
    template: `foo var bas <counter></counter>`
  }),
}
</script>

So, in SSR, all good!

But then, in the client, there's no runtime compiler

image

I try to fix it by aliasing ´vue´ with for the vue.esm.bundler, but then I break the server.

Is this an easy fix? Or can you give me some light onto solving this?

I'm invested in doing it, just give me some pointers, I will find a fix and make a PR.

pnpm i fail

Describe the bug

The post install script nuxi prepare fail, by saying missing "name" property, i'm not sure it's issue of vitesse config or just nuxt.

Reproduction

npx degit antfu/vitesse-nuxt3 my-nuxt3-app 
cd my-nuxt3-app
pnpm i 

System Info

System:
    OS: macOS 13.2.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 50.23 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.8.1 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.5.1 - /opt/homebrew/bin/npm
    pnpm 7.30.0
  Browsers:
    Brave Browser: 111.1.49.128
    Safari: 16.3

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

dark mode does not apply for initial load of the page.

there is an issue about dark mode when you open the page it looks like in dark mode in the backend, i say this because when you click the dark mode button it does not anything but, the second click it goes to dark mode. i guess there is an issue where is in the backend of dark mode things. it does not update the front-end for initial load of the page. tried in incognito mode. because it caches the state of the dark mode.

Error when update nuxt to 3.0.0-rc.8

Describe the bug

im update nuxt to 3.0.0-rc.8.
and then when pnpm build.
image

Reproduction

upgrade nuxt to 3.0.0-rc.8.

System Info

System:
    OS: macOS 12.5.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 716.69 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Brave Browser: 104.1.42.97
    Chrome: 104.0.5112.101
    Firefox Developer Edition: 105.0
    Safari: 15.6.1

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

UnoCSS presets not working in production

Describe the bug

I have installed DaisyUI Unocss presets from this repository:

https://github.com/kidonng/unocss-preset-daisy

The preset works when running pnpm dev

2022-12-10-193122_507x122_scrot

The preset is broken when running pnpm build && pnpm start

2022-12-10-193204_516x122_scrot

Reproduction

https://github.com/lapwat/vitesse-nuxt3

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

CSS flash in developmemt

Mostly for DX, I don't know where this comes from

Screenshot.2021-11-04.at.14.56.06.mp4

I let you link to the correct issue on nuxt/framework @antfu

use with Storybook (nuxt3)

Hi @antfu thanks for your work, really amazing !

I'm currently triyng to use unoCss() with nuxt3 and storybook (w/ storybook-builder-vite),
but icons doesn't displayed on stories (work good in dev), no errors

Do you have any example or maybe idea to make it work ?

nuxt.config.js

buildModules: [
    '@unocss/nuxt',
  ],

  unocss: {
    uno: true,
    attributify: true,
    preflight: true,
    icons: {
      scale: 1.2,
    },
    shortcuts: [
      ['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
    ],
  },

main.js (.storybook)

module.exports = {
stories: [
  	'../stories/**/*.stories.mdx',
  	'../stories/**/*.stories.@(js|jsx|ts|tsx)',
  	'../components/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
  '@storybook/addon-essentials',
  {
  		name: '@storybook/addon-postcss',
  		options: {
  			cssLoaderOptions: {
  				importLoaders: 1,
  			},
  			postcssLoaderOptions: {
  				implementation: require('postcss'),
  			}
  		}
  }
],
core: {
  builder: 'storybook-builder-vite'
},
  viteFinal: async config => {
  return {
    ...config,
    plugins: [
      ...config.plugins,
    ],
    resolve: {
      ...config.resolve,
      alias: {
        ...config.resolve.alias,
        '@': path.resolve(__dirname, '../')
      }
    }
  }
}
}

Thanks.

What parameter cl means?

Clear and concise description of the problem

Hi

<nuxt-layout cl>

I see it doesn't work without cl parameter.
Would you let me know what cl means?

Best,

Suggested solution

no

Alternative

No response

Additional context

No response

Validations

Unocss issue on antfu / vitesse-nuxt3

I have problem in not working space-x-? class.
On even FRASH setup antfu/vitesse-nuxt3

div class="bg-white h-full">
div class="flex space-x-4">
div class="bg-red-600">03
div class="bg-red-600">02
div class="bg-red-600">03
/div>
/div>

result in
.space-x-4>:not([hidden])~:not([hidden])>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(1rem * calc(1 - var(--un-space-x-reverse)));margin-right:calc(1rem * var(--un-space-x-reverse));}
correct css
.space-x-4>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(1rem * calc(1 - var(--un-space-x-reverse)));margin-right:calc(1rem * var(--un-space-x-reverse));}

:not([hidden])~:not([hidden]) - is extra code that is not supposed to be there. that why css does not work

UnoCSS result in correct code. That is why it is not issue with Unocss as I been replied.
Playground

Fonts not working

Installed a fresh vitesse-nuxt3 and added the following code to unocss: { }

// nuxt.config.ts

unocss: { 
   // other code here,
    webFonts: {
      provider: "google",
      fonts: {
        sans: "Roboto",
      },
    },
  }

 WARN: Issues with peer dependencies found

Describe the bug

  1. npx degit antfu/vitesse-nuxt3 my-nuxt3-app

  2. cd my-nuxt3-app

  3. pnpm i

> nuxi prepare

Nuxt CLI v3.0.0-rc.8
√ Types generated in .nuxt

devDependencies:
+ @antfu/eslint-config 0.26.2
+ @iconify-json/carbon 1.1.7
+ @iconify-json/twemoji 1.1.5
+ @nuxtjs/color-mode 3.1.4
+ @pinia/nuxt 0.4.1
+ @unocss/nuxt 0.45.13
+ @vueuse/nuxt 9.1.1
+ eslint 8.23.0
+ nuxt 3.0.0-rc.8
+ pinia 2.0.21
+ typescript 4.8.2

 WARN  Issues with peer dependencies found
.
├─┬ @nuxtjs/color-mode
│ └─┬ @nuxt/kit
│   └─┬ @nuxt/schema
│     └─┬ unimport
│       └─┬ unplugin
│         ├── ✕ missing peer vite@"^2.3.0 || ^3.0.0-0"
│         └── ✕ missing peer webpack@"4 || 5"
├─┬ @pinia/nuxt
│ ├─┬ @nuxt/kit
│ │ ├─┬ unctx
│ │ │ └─┬ unplugin
│ │ │   ├── ✕ missing peer vite@^2.3.0
│ │ │   └── ✕ missing peer webpack@"4 || 5"
│ │ └─┬ unimport
│ │   └─┬ unplugin
│ │     ├── ✕ missing peer vite@"^2.3.0 || ^3.0.0-0"
│ │     └── ✕ missing peer webpack@"4 || 5"
│ └─┬ pinia
│   ├── ✕ missing peer vue@"^2.6.14 || ^3.2.0"
│   └─┬ vue-demi
│     └── ✕ missing peer vue@"^3.0.0-0 || ^2.6.0"
├─┬ @unocss/nuxt
│ ├─┬ @unocss/vite
│ │ └── ✕ missing peer vite@"^2.9.0 || ^3.0.0-0"
│ └─┬ @unocss/webpack
│   └── ✕ missing peer webpack@"^4 || ^5"
└─┬ nuxt
  ├─┬ nitropack
  │ └─┬ unimport
  │   └─┬ unplugin
  │     ├── ✕ missing peer vite@"^2.3.0 || ^3.0.0-0"
  │     └── ✕ missing peer webpack@"4 || 5"
  └─┬ @nuxt/vite-builder
    └─┬ @nuxt/kit
      └─┬ @nuxt/schema
        └─┬ unimport
          └─┬ unplugin
            └── ✕ missing peer webpack@"4 || 5"
Peer dependencies that should be installed:
  vite@">=2.9.0 <3.0.0 || >=3.0.0-0 <3.0.0"
  vue@">=3.0.0-0 <3.0.0 || >=3.2.0 <4.0.0 || >=2.6.14 <3.0.0"
  webpack@">=4.0.0 <5.0.0 || >=5.0.0 <6.0.0"

Reproduction

Follow this steps: https://github.com/antfu/vitesse-nuxt3#clone-to-local

System Info

Windows 11
pnpm v6.30.1

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

unocss: unmatched utility

Starting nuxt cause some warings:

WARN  [unocss] unmatched utility "disabled:cursor-default" in shortcut "btn"
WARN  [unocss] unmatched utility "disabled:bg-gray-600" in shortcut "btn"         
WARN  [unocss] unmatched utility "disabled:opacity-50" in shortcut "btn"

I think it's come from unocss.shortcuts in nuxt.config.ts. Don't know why...

"@unocss/nuxt": "^0.12.9",

Add Cypress for end-to-end testing

It would be good to have some tests in the default starter. The Nuxt team is going to write a Nuxt + Vitest package for unit testing, but until that is done, it looks like end-to-end testing is the only way to go!

I did a 9.0 version of this locally, but I believe we should wait until Cypress 10.0 because of cypress.config.ts and the removal of the plugins file -- which currently does not support typescript or mjs.

https://twitter.com/antfu7/status/1516988226665287680?s=20&t=vSANZvO3kReXgW5v9tmciw

When I use the `@ vueuse/nuxt` terminal, tell me a [warn]

Describe the bug

[warn] [nuxt] You are using a plugin that has not been wrapped in `defineNuxtPlugin`.
 It is advised to wrap your plugins as in the future this may enable enhancements: () => { }

when i install yarn add @vueuse/nuxt @vueuse/core.in nuxt.config.ts:

1. don't modules: ['@vueuse/nuxt']. don't have warn.
image

2. modules: ['@vueuse/nuxt']`. have a warn.
image

Reproduction

https://github.com/RSS1102/for-nuxt3-vueuse

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
    Memory: 3.01 GB / 13.86 GB
  Binaries:
    Node: 18.1.0 - D:\nvm\node\node.EXE
    Yarn: 1.22.19 - D:\nvm\node\yarn.CMD
    npm: 8.8.0 - D:\nvm\node\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (104.0.1293.70)
    Internet Explorer: 11.0.22000.120

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

cannot read file /.nuxt/tsconfig.json

screen 2022-05-04 104424

The tsconfig.json gives an error on the first bracket in the my-nuxt3app/tsconfig.json file.

Cannot read file '... my-nuxt3-app/.nuxt/tsconfig.json'. ts

error when running on windows

Cloned repo + pnpm i + nr dev, seems a problem on nuxt3:

uxtdistplugin.mjs" from "virtual:F:\work\projects\quini\GitHub\antfu\vitesse-nuxt3\.nuxt\plugins\server.mjs". Does the file exist?

System info:

System:
    OS: Windows 10 10.0.19042
    CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
    Memory: 49.33 GB / 63.95 GB
  Binaries:
    Node: 16.12.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 95.0.4638.69
    Edge: Spartan (44.19041.1266.0), Chromium (95.0.1020.40)
    Internet Explorer: 11.0.19041.1202

and the error:

F:\work\projects\quini\GitHub\antfu\vitesse-nuxt3>nr dev

> @ dev F:\work\projects\quini\GitHub\antfu\vitesse-nuxt3
> nuxi dev
Nuxt CLI v3.0.0-27268729.5b8e10f                                                                                                                                                                         17:27:35
                                                                                                                                                                                                         17:27:35
  > Local:    http://localhost:3000/
  > Network:  http://172.19.96.1:3000/
  > Network:  http://192.168.1.37:3000/


 WARN  Current version of Node.js (15.11.0) is unsupported and might cause issues.                                                                                                                       17:27:39
       Please upgrade to a compatible version (^14.16.0 || ^16.11.0 || ^17.0.0).

i Vite warmed up in 839ms                                                                                                                                                                                17:27:46

 WARN  [SSR] Error transforming virtual:F:/work/projects/quini/GitHub/antfu/vitesse-nuxt3/.nuxt/plugins/server.mjs: Error: Failed to resolve import "F:workprojectsquiniGitHubantfu♂itesse-nuxt3          17:27:46
ode_modules.pnpm@[email protected][email protected]
ode_modules@pinia
uxtdistplugin.mjs" from "virtual:F:\work\projects\quini\GitHub\antfu\vitesse-nuxt3\.nuxt\plugins\server.mjs". Does the file exist?

√ Vite server built in 1422ms                                                                                                                                                                            17:27:46
√ Nitro built in 184 ms                                                                                                                                                                                  17:27:47
Cannot read property 'map' of undefined
  at Module.normalizePlugins (file:///F:/work/projects/quini/GitHub/antfu/vitesse-nuxt3/.nuxt/dist/server/server.mjs:179:28)
  at $id_a8355258 (file:///F:/work/projects/quini/GitHub/antfu/vitesse-nuxt3/.nuxt/dist/server/server.mjs:28:39)
  at async __instantiateModule__ (file:///F:/work/projects/quini/GitHub/antfu/vitesse-nuxt3/.nuxt/dist/server/server.mjs:1078:3)
Cannot read property 'map' of undefined
  at Module.normalizePlugins (file:///F:/work/projects/quini/GitHub/antfu/vitesse-nuxt3/.nuxt/dist/server/server.mjs:179:28)
  at $id_a8355258 (file:///F:/work/projects/quini/GitHub/antfu/vitesse-nuxt3/.nuxt/dist/server/server.mjs:28:39)
  at async __instantiateModule__ (file:///F:/work/projects/quini/GitHub/antfu/vitesse-nuxt3/.nuxt/dist/server/server.mjs:1078:3)
Cannot read property 'map' of undefined
  at Module.normalizePlugins (file:///F:/work/projects/quini/GitHub/antfu/vitesse-nuxt3/.nuxt/dist/server/server.mjs:179:28)
  at $id_a8355258 (file:///F:/work/projects/quini/GitHub/antfu/vitesse-nuxt3/.nuxt/dist/server/server.mjs:28:39)
  at async __instantiateModule__ (file:///F:/work/projects/quini/GitHub/antfu/vitesse-nuxt3/.nuxt/dist/server/server.mjs:1078:3)

 WARN  [unocss] entry module not found, have you add import 'uno.css' in your main entry?                                                                                                                17:27:49

404 page generates an error

After the app is built using "nuxi build" and started by "node .output/server/index.mjs" an error occurs:

[nitro] Error while generating error response FetchError: 404 (/__nuxt_error?url=/_nuxt/__vite_ping&statusCode=404&statusMessage=Cannot+find+static+asset+/_nuxt/__vite_ping&message=Cannot+find+static+asset+/_nuxt/__vite_ping&description)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.errorhandler [as onError] (file:///home/xxxxx/source/xxxxx/app/.output/server/chunks/nitro/node-server.mjs:310:16)
at async Server.nodeHandler (file:///home/xxxxx/source/xxxxx/app/.output/server/node_modules/h3/dist/index.mjs:370:9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.