nuxt / nuxt

The Intuitive Vue Framework.
https://nuxt.com
MIT License
55.17k stars 5.05k forks source link

ERROR Identifier "alias" has already been declared #25363

Closed fearart closed 10 months ago

fearart commented 10 months ago

Environment

Working directory: C:/dev/hotel-viewer 19:36:09 Nuxt project info: 19:36:09


👉 Report an issue: https://github.com/nuxt/nuxt/issues/new 19:36:09

👉 Suggest an improvement: https://github.com/nuxt/nuxt/discussions/new

👉 Read documentation: https://nuxt.com

Reproduction

dont know, installed unstorage and sharp and this error occured

Describe the bug

when using dev everything is fine, but when building into prod having issue called ERROR Identifier "alias" has already been declared

Additional context

No response

Logs

PS C:\dev\hotel-viewer> npm run build

> build
> nuxt build

Nuxt 3.8.1 with Nitro 2.8.0                                                                                                                                                              19:34:53
ℹ Using default Tailwind CSS file                                                                                                                                      nuxt:tailwindcss 19:34:58
ℹ Building client...                                                                                                                                                                    19:35:06
ℹ vite v4.5.2 building for production...                                                                                                                                                19:35:06

[19:35:23]  WARN  [plugin:vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "C:/dev/hotel-viewer/node_modules/jsonwebtoken/verify.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

[19:35:23]  WARN  [plugin:vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "C:/dev/hotel-viewer/node_modules/jsonwebtoken/sign.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

[19:35:23]  WARN  [plugin:vite:resolve] Module "stream" has been externalized for browser compatibility, imported by "C:/dev/hotel-viewer/node_modules/jws/lib/sign-stream.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

[19:35:23]  WARN  [plugin:vite:resolve] Module "util" has been externalized for browser compatibility, imported by "C:/dev/hotel-viewer/node_modules/jws/lib/sign-stream.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

[19:35:23]  WARN  [plugin:vite:resolve] Module "stream" has been externalized for browser compatibility, imported by "C:/dev/hotel-viewer/node_modules/jws/lib/verify-stream.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

[19:35:23]  WARN  [plugin:vite:resolve] Module "util" has been externalized for browser compatibility, imported by "C:/dev/hotel-viewer/node_modules/jws/lib/verify-stream.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

[19:35:23]  WARN  [plugin:vite:resolve] Module "stream" has been externalized for browser compatibility, imported by "C:/dev/hotel-viewer/node_modules/jws/lib/data-stream.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

[19:35:23]  WARN  [plugin:vite:resolve] Module "util" has been externalized for browser compatibility, imported by "C:/dev/hotel-viewer/node_modules/jws/lib/data-stream.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

[19:35:23]  WARN  [plugin:vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "C:/dev/hotel-viewer/node_modules/jwa/index.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

[19:35:23]  WARN  [plugin:vite:resolve] Module "util" has been externalized for browser compatibility, imported by "C:/dev/hotel-viewer/node_modules/jwa/index.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

ℹ ✓ 606 modules transformed.                                                                                                                                                            19:35:26   
Inspect report generated at C:/dev/hotel-viewer/.nuxt/analyze/.vite-inspect
ℹ .nuxt/dist/client/_nuxt/Montserrat-400-3.907f82b6.woff2        5.08 kB                                                                                                                19:35:29
ℹ .nuxt/dist/client/_nuxt/Montserrat-400-2.3a86ec5d.woff2        8.64 kB                                                                                                                19:35:29
ℹ .nuxt/dist/client/_nuxt/Montserrat-400-1.c0af559e.woff2        9.58 kB                                                                                                                19:35:29
ℹ .nuxt/dist/client/_nuxt/Montserrat-400-4.ccedeb15.woff2       13.51 kB                                                                                                                19:35:29
ℹ .nuxt/dist/client/_nuxt/Montserrat-400-5.4b5816bb.woff2       14.94 kB                                                                                                                19:35:29
ℹ .nuxt/dist/client/manifest.json                               29.49 kB │ gzip:   2.68 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/CommandPaletteGroup.9e8db163.css       0.14 kB │ gzip:   0.10 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/index.8815b278.css                     0.27 kB │ gzip:   0.15 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/floor.f2a7958d.css                     0.75 kB │ gzip:   0.39 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/error-500.e798523c.css                 2.02 kB │ gzip:   0.75 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Progress.fc3cdff3.css                  2.43 kB │ gzip:   0.44 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/error-404.95c28eb4.css                 3.70 kB │ gzip:   1.13 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/entry.1028ff6a.css                   263.23 kB │ gzip:  33.76 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/uid.12f507af.js                        0.06 kB │ gzip:   0.08 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/micro-task.89dcd6af.js                 0.14 kB │ gzip:   0.14 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/open-closed.4a59a23e.js                0.30 kB │ gzip:   0.22 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/admin.ac798356.js                      0.35 kB │ gzip:   0.26 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/use-resolve-button-type.920f2ffc.js    0.45 kB │ gzip:   0.30 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Skeleton.68c1ce71.js                   0.58 kB │ gzip:   0.38 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/hidden.88f3faa6.js                     0.67 kB │ gzip:   0.46 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Container.2b32f1da.js                  0.69 kB │ gzip:   0.43 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/test.5f520791.js                       0.70 kB │ gzip:   0.45 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/import.a6e447fa.js                     0.80 kB │ gzip:   0.52 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Kbd.8c3dd2e1.js                        0.82 kB │ gzip:   0.49 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/use-controllable.b0439d3f.js           0.96 kB │ gzip:   0.53 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/useFormGroup.7976eadc.js               1.00 kB │ gzip:   0.46 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/AvatarGroup.78500ec6.js                1.04 kB │ gzip:   0.59 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/use-text-value.13bcd2de.js             1.05 kB │ gzip:   0.59 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/disposables.57da4964.js                1.10 kB │ gzip:   0.51 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Card.e258731f.js                       1.14 kB │ gzip:   0.58 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Badge.9750211d.js                      1.25 kB │ gzip:   0.62 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/use-outside-click.6694e5ce.js          1.38 kB │ gzip:   0.64 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/use-tracked-pointer.879de508.js        1.39 kB │ gzip:   0.75 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/ContextMenu.f82643e8.js                1.45 kB │ gzip:   0.80 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/VerticalNavigation.34f40161.js         1.77 kB │ gzip:   0.86 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/error-500.d7e0ad0c.js                  1.88 kB │ gzip:   0.99 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Divider.5f1ba701.js                    1.93 kB │ gzip:   0.84 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/RadioGroup.c1a42c7e.js                 2.13 kB │ gzip:   1.03 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Radio.8d4f79b4.js                      2.13 kB │ gzip:   1.00 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/ButtonGroup.6e7d261b.js                2.21 kB │ gzip:   0.78 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/error-404.89e5dab8.js                  2.22 kB │ gzip:   1.15 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Tooltip.0f283c21.js                    2.27 kB │ gzip:   1.14 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Modal.66be4d0d.js                      2.32 kB │ gzip:   1.07 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Slideover.1f986acc.js                  2.34 kB │ gzip:   1.09 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Checkbox.e25206cd.js                   2.35 kB │ gzip:   1.07 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Range.67414df2.js                      2.47 kB │ gzip:   1.07 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Meter.5e5bcec7.js                      2.78 kB │ gzip:   1.13 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Textarea.5098fc77.js                   2.85 kB │ gzip:   1.24 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/FormGroup.d67c462f.js                  2.90 kB │ gzip:   0.99 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Alert.221878b0.js                      2.92 kB │ gzip:   1.19 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Form.14a584d2.js                       2.94 kB │ gzip:   1.23 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/Progress.b286dcb6.js                   3.11 kB │ gzip:   1.26 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/dom.eeeb9963.js                        3.34 kB │ gzip:   1.66 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/use-root-containers.15707d51.js        3.41 kB │ gzip:   1.54 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/MeterGroup.d50a9158.js                 3.70 kB │ gzip:   1.49 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/focus-management.a947c1d2.js           3.74 kB │ gzip:   1.72 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Toggle.00967fda.js                     4.16 kB │ gzip:   1.75 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Pagination.2f47f5eb.js                 4.20 kB │ gzip:   1.52 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/CommandPaletteGroup.8fb8a10c.js        4.26 kB │ gzip:   1.66 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Input.7cb9ff3e.js                      4.41 kB │ gzip:   1.52 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Select.356f0af6.js                     5.62 kB │ gzip:   1.86 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Table.4af1efe3.js                      5.75 kB │ gzip:   2.18 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/Accordion.d15c291b.js                  6.39 kB │ gzip:   2.50 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Tabs.09992018.js                      10.30 kB │ gzip:   3.83 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/srv.ad838087.js                       10.86 kB │ gzip:   3.33 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/login.27f17599.js                     11.21 kB │ gzip:   5.37 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Popover.8b27d3dc.js                   11.39 kB │ gzip:   4.15 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/Dropdown.0b898570.js                  11.86 kB │ gzip:   4.38 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/combobox.81d0b1c2.js                  14.35 kB │ gzip:   4.68 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/transition.a2db4549.js                18.45 kB │ gzip:   6.85 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/usePopper.7fe4d149.js                 20.15 kB │ gzip:   7.56 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/SelectMenu.ebdd27f9.js                20.79 kB │ gzip:   6.63 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/CommandPalette.e498268a.js            22.45 kB │ gzip:   8.02 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/axios.28bc18a3.js                     29.45 kB │ gzip:  11.91 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/index.64be313f.js                     34.83 kB │ gzip:  22.96 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/floor.ec4f4b84.js                     35.89 kB │ gzip:   9.54 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/protected.87c438cd.js                 84.07 kB │ gzip:  26.87 kB                                                                                              19:35:29
ℹ .nuxt/dist/client/_nuxt/entry.4b7380f1.js                    267.55 kB │ gzip:  91.57 kB                                                                                              19:35:29   
ℹ .nuxt/dist/client/_nuxt/browser.umd.3719f3a5.js              880.26 kB │ gzip: 257.90 kB                                                                                              19:35:29   

 WARN                                                                                                                                                                                    19:35:29  
(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

ℹ ✓ built in 23.57s                                                                                                                                                                     19:35:29   
✔ Client built in 23730ms                                                                                                                                                               19:35:29   
ℹ Building server...                                                                                                                                                                    19:35:29
ℹ vite v4.5.2 building SSR bundle for production...                                                                                                                                     19:35:29
ℹ ✓ 1 modules transformed.                                                                                                                                                              19:35:29   
Inspect report generated at C:/dev/hotel-viewer/.nuxt/analyze/.vite-inspect
ℹ .nuxt/dist/server/styles.mjs  0.07 kB                                                                                                                                                 19:35:30   
ℹ .nuxt/dist/server/server.mjs  0.10 kB │ map: 0.22 kB                                                                                                                                  19:35:30   
ℹ ✓ built in 701ms                                                                                                                                                                      19:35:30   
✔ Server built in 731ms                                                                                                                                                                 19:35:30
✔ Generated public .output/public                                                                                                                                                 nitro 19:35:31
ℹ Building Nitro Server (preset: node-server)                                                                                                                                     nitro 19:35:31

 ERROR  RollupError: Identifier "alias" has already been declared                                                                                                                  nitro 19:35:58  

821:  */
822:
823: Schema.prototype.alias = function alias(path, alias) {
                                       ^
824:   aliasFields(this, { [path]: alias });
825:   return this;

 ERROR  Identifier "alias" has already been declared                                                                                                                                     19:35:58  

  at error (/C:/dev/hotel-viewer/node_modules/nitropack/node_modules/rollup/dist/es/shared/parseAst.js:337:30)
  at Module.error (/C:/dev/hotel-viewer/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:12728:16)
  at FunctionScope.addDeclaration (/C:/dev/hotel-viewer/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:5802:21)
  at Identifier.declare (/C:/dev/hotel-viewer/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:7202:39)
  at FunctionExpression.initialise (/C:/dev/hotel-viewer/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:8169:18)
  at new NodeBase (/C:/dev/hotel-viewer/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:4607:14)
  at new FunctionBase (/C:/dev/hotel-viewer/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:7659:9)
  at new FunctionNode (/C:/dev/hotel-viewer/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:8102:9)
  at new FunctionExpression (/C:/dev/hotel-viewer/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:9741:1)
  at AssignmentExpression.parseNode (/C:/dev/hotel-viewer/node_modules/nitropack/node_modules/rollup/dist/es/shared/node-entry.js:4722:29)

 ERROR  Identifier "alias" has already been declared
github-actions[bot] commented 10 months ago

Would you be able to provide a reproduction? 🙏

More info ### Why do I need to provide a reproduction? Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. ### What will happen? If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect. If `needs reproduction` labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it. ### How can I create a reproduction? We have a couple of templates for starting with a minimal reproduction: 👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz 👉 https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox A public GitHub repository is also perfect. 👌 Please ensure that the reproduction is as **minimal** as possible. See more details [in our guide](https://nuxt.com/docs/community/reporting-bugs/#create-a-minimal-reproduction). You might also find these other articles interesting and/or helpful: - [The Importance of Reproductions](https://antfu.me/posts/why-reproductions-are-required) - [How to Generate a Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/mcve)
fearart commented 10 months ago

Well I've fixed it just upgrading packages npm upgrade