Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuxt build fails with promises.cp is not a function #21723

Closed
satyarohith opened this issue Dec 28, 2023 · 1 comment · Fixed by #21745
Closed

nuxt build fails with promises.cp is not a function #21723

satyarohith opened this issue Dec 28, 2023 · 1 comment · Fixed by #21745
Assignees

Comments

@satyarohith
Copy link
Member

satyarohith commented Dec 28, 2023

To re-produce, run the following commands:

deno run npm:nuxi@latest init myapp
cd myapp
deno task build --preset=deno_deploy

error logs:

Task build nuxt build "--preset=deno_deploy"
Nuxt 3.9.0                                                                                                                                                      6:55:20 PM
ℹ Using Nitro server preset: deno_deploy                                                                                                                       6:55:20 PM
ℹ Building client...                                                                                                                                           6:55:23 PM
ℹ vite v5.0.10 building for production...                                                                                                                      6:55:23 PM
ℹ ✓ 106 modules transformed.                                                                                                                                   6:55:24 PM
Inspect report generated at /Users/sr/p/myapp/.nuxt/analyze/.vite-inspect
ℹ .nuxt/dist/client/manifest.json                   1.45 kB │ gzip:  0.32 kB                                                                                   6:55:24 PM
ℹ .nuxt/dist/client/_nuxt/error-500.UlRoQXk7.css    1.95 kB │ gzip:  0.74 kB                                                                                   6:55:24 PM
ℹ .nuxt/dist/client/_nuxt/error-404.GrQq_5wT.css    3.62 kB │ gzip:  1.11 kB                                                                                   6:55:24 PM
ℹ .nuxt/dist/client/_nuxt/entry.hZ8jvGUC.css       12.14 kB │ gzip:  2.49 kB                                                                                   6:55:24 PM
ℹ .nuxt/dist/client/_nuxt/error-500.fJtdsKqg.js     1.88 kB │ gzip:  0.99 kB                                                                                   6:55:24 PM
ℹ .nuxt/dist/client/_nuxt/error-404.zwaUFw3R.js     6.41 kB │ gzip:  2.82 kB                                                                                   6:55:24 PM
ℹ .nuxt/dist/client/_nuxt/entry.HzgKOe_x.js       204.19 kB │ gzip: 58.98 kB                                                                                   6:55:24 PM
ℹ ✓ built in 780ms                                                                                                                                             6:55:24 PM
✔ Client built in 787ms                                                                                                                                        6:55:24 PM
ℹ Building server...                                                                                                                                           6:55:24 PM
ℹ vite v5.0.10 building SSR bundle for production...                                                                                                           6:55:24 PM
ℹ ✓ 62 modules transformed.                                                                                                                                    6:55:25 PM
Inspect report generated at /Users/sr/p/myapp/.nuxt/analyze/.vite-inspect
ℹ .nuxt/dist/server/_nuxt/entry-styles.pEtQ0kIp.mjs             0.08 kB                                                                                        6:55:25 PM
ℹ .nuxt/dist/server/_nuxt/error-404-styles.eFmMlblH.mjs         0.15 kB                                                                                        6:55:25 PM
ℹ .nuxt/dist/server/_nuxt/error-500-styles.I81gssEB.mjs         0.15 kB                                                                                        6:55:25 PM
ℹ .nuxt/dist/server/styles.mjs                                  0.58 kB                                                                                        6:55:25 PM
ℹ .nuxt/dist/server/_nuxt/island-renderer-odSsauTi.js           1.12 kB │ map:   1.57 kB                                                                       6:55:25 PM
ℹ .nuxt/dist/server/_nuxt/error-500-styles-1.mjs-wIv98JUg.js    2.17 kB │ map:   0.12 kB                                                                       6:55:25 PM
ℹ .nuxt/dist/server/_nuxt/error-500-8VCoAg1h.js                 3.12 kB │ map:   3.83 kB                                                                       6:55:25 PM
ℹ .nuxt/dist/server/_nuxt/error-404-styles-1.mjs-qgf1JzaT.js    3.86 kB │ map:   0.12 kB                                                                       6:55:25 PM
ℹ .nuxt/dist/server/_nuxt/multipart-parser-YJmyN3u-.js          7.31 kB │ map:  10.89 kB                                                                       6:55:25 PM
ℹ .nuxt/dist/server/_nuxt/error-404-HiJu9Vb9.js                10.38 kB │ map:  21.61 kB                                                                       6:55:25 PM
ℹ .nuxt/dist/server/_nuxt/entry-styles-1.mjs-DSip0M9k.js       12.40 kB │ map:   0.11 kB                                                                       6:55:25 PM
ℹ .nuxt/dist/server/server.mjs                                289.98 kB │ map: 435.09 kB                                                                       6:55:25 PM
ℹ ✓ built in 685ms                                                                                                                                             6:55:25 PM
✔ Server built in 691ms                                                                                                                                        6:55:25 PM

 ERROR  promises.cp is not a function                                                                                                                           6:55:25 PM

  at node_modules/.deno/[email protected]/node_modules/nitropack/dist/shared/nitro.4ea992bc.mjs:2319:28
  at Array.map (<anonymous>)
  at copyPublicAssets (node_modules/.deno/[email protected]/node_modules/nitropack/dist/shared/nitro.4ea992bc.mjs:2315:22)
  at eventLoopTick (ext:core/01_core.js:181:11)
  at async node_modules/.deno/[email protected]/node_modules/nuxt/dist/index.mjs:3092:7
  at async build (node_modules/.deno/[email protected]/node_modules/nitropack/dist/shared/nitro.4ea992bc.mjs:2334:3)
  at async node_modules/.deno/[email protected]/node_modules/nuxt/dist/index.mjs:3104:7
  at async build (node_modules/.deno/[email protected]/node_modules/nuxt/dist/index.mjs:4554:5)
  at async Object.run (node_modules/.deno/[email protected]/node_modules/nuxi/dist/chunks/build.mjs:98:5)
  at async runCommand$1 (node_modules/.deno/[email protected]/node_modules/nuxi/dist/shared/nuxi.4fde776c.mjs:1648:16)
  at async runCommand$1 (node_modules/.deno/[email protected]/node_modules/nuxi/dist/shared/nuxi.4fde776c.mjs:1639:11)
  at async runMain$1 (node_modules/.deno/[email protected]/node_modules/nuxi/dist/shared/nuxi.4fde776c.mjs:1773:7) 
@littledivy
Copy link
Member

With #21745

divy@mini ~/g/myapp (main)> ../deno/target/release/deno task build --preset=deno_deploy
Task build nuxt build "--preset=deno_deploy"
Nuxt 3.9.0 with Nitro 2.8.1                                        12:18:20 PM
ℹ Using Nitro server preset: deno_deploy                          12:18:20 PM
ℹ Building client...                                              12:18:22 PM
ℹ vite v5.0.10 building for production...                         12:18:22 PM
ℹ ✓ 117 modules transformed.                                      12:18:23 PM
Inspect report generated at /Users/divy/gh/myapp/.nuxt/analyze/.vite-inspect
[12:18:23 PM] ℹ .nuxt/dist/client/manifest.json                     1.70 kB │ gzip:  0.37 kB
[12:18:23 PM] ℹ .nuxt/dist/client/_nuxt/error-500.UlRoQXk7.css      1.95 kB │ gzip:  0.74 kB
[12:18:23 PM] ℹ .nuxt/dist/client/_nuxt/error-404.GrQq_5wT.css      3.62 kB │ gzip:  1.11 kB
[12:18:23 PM] ℹ .nuxt/dist/client/_nuxt/entry.AeIfFhMf.css         12.14 kB │ gzip:  2.49 kB
[12:18:23 PM] ℹ .nuxt/dist/client/_nuxt/vue.f36acd1f.-qcomNdB.js    0.39 kB │ gzip:  0.27 kB
[12:18:23 PM] ℹ .nuxt/dist/client/_nuxt/error-500.czFkt3XI.js       1.92 kB │ gzip:  1.01 kB
[12:18:23 PM] ℹ .nuxt/dist/client/_nuxt/error-404.VUDlVLpo.js       6.45 kB │ gzip:  2.84 kB
[12:18:23 PM] ℹ .nuxt/dist/client/_nuxt/entry.BVFg53tb.js         212.51 kB │ gzip: 60.32 kB
ℹ ✓ built in 801ms                                                12:18:23 PM
✔ Client built in 807ms                                           12:18:23 PM
ℹ Building server...                                              12:18:23 PM
ℹ vite v5.0.10 building SSR bundle for production...              12:18:23 PM
ℹ ✓ 53 modules transformed.                                       12:18:24 PM
Inspect report generated at /Users/divy/gh/myapp/.nuxt/analyze/.vite-inspect
[12:18:24 PM] ℹ .nuxt/dist/server/_nuxt/entry-styles.DisOMdDG.mjs             0.08 kB
[12:18:24 PM] ℹ .nuxt/dist/server/_nuxt/error-404-styles.eFmMlblH.mjs         0.15 kB
[12:18:24 PM] ℹ .nuxt/dist/server/_nuxt/error-500-styles.I81gssEB.mjs         0.15 kB
[12:18:24 PM] ℹ .nuxt/dist/server/styles.mjs                                  0.58 kB
[12:18:24 PM] ℹ .nuxt/dist/server/_nuxt/index-tbNGurtz.js                     0.98 kB │ map:   6.00 kB
[12:18:24 PM] ℹ .nuxt/dist/server/_nuxt/island-renderer-xq5m2Cff.js           1.00 kB │ map:   1.57 kB
[12:18:24 PM] ℹ .nuxt/dist/server/_nuxt/error-500-styles-1.mjs-wIv98JUg.js    2.17 kB │ map:   0.12 kB
[12:18:24 PM] ℹ .nuxt/dist/server/_nuxt/error-500-e0-vPmT4.js                 3.04 kB │ map:   3.83 kB
[12:18:24 PM] ℹ .nuxt/dist/server/_nuxt/error-404-styles-1.mjs-qgf1JzaT.js    3.86 kB │ map:   0.12 kB
[12:18:24 PM] ℹ .nuxt/dist/server/_nuxt/error-404-_-HQLjuZ.js                10.28 kB │ map:  21.61 kB
[12:18:24 PM] ℹ .nuxt/dist/server/_nuxt/entry-styles-1.mjs-nZXIaAbw.js       12.40 kB │ map:   0.11 kB
[12:18:24 PM] ℹ .nuxt/dist/server/server.mjs                                126.74 kB │ map: 179.08 kB
ℹ ✓ built in 390ms                                                12:18:24 PM
✔ Server built in 393ms                                           12:18:24 PM

littledivy added a commit that referenced this issue Jan 5, 2024
Fixes #20803
Fixes #21723

Performance: copying a 48GiB rust `target` folder (recursive)
| Platform  | `deno` | `node v21.5` | Improvement |
| -------- | ------- | ------- | ------- |
| macOS (APFS) |   3.1secs  |  127.99 secs |  **42x** |
| Windows | 18.3secs | 67.2secs |  **3.8x** |

Copying files with varying sizes:


![image](https://github.com/denoland/deno/assets/34997667/58932652-6f7a-47f5-8504-896dc9ab4ddc)
bartlomieju pushed a commit that referenced this issue Jan 12, 2024
Fixes #20803
Fixes #21723

Performance: copying a 48GiB rust `target` folder (recursive)
| Platform  | `deno` | `node v21.5` | Improvement |
| -------- | ------- | ------- | ------- |
| macOS (APFS) |   3.1secs  |  127.99 secs |  **42x** |
| Windows | 18.3secs | 67.2secs |  **3.8x** |

Copying files with varying sizes:


![image](https://github.com/denoland/deno/assets/34997667/58932652-6f7a-47f5-8504-896dc9ab4ddc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants