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

Failing to build client Nuxt + Basic + Universal ( nuxt-ts generate ) #185

Closed
1 of 3 tasks
LumaKernel opened this issue Feb 23, 2021 · 2 comments
Closed
1 of 3 tasks

Comments

@LumaKernel
Copy link
Contributor

LumaKernel commented Feb 23, 2021

Description

CI で落ちていた。ローカルでも動かず。

node ./bin/index --answers '{"dir":"./foo-1","server":"express","client":"nuxt","building":"basic","mode":"universal","target":"static","aspida":"axios","reactHooks":"none","daemon":"pm2","orm":"prisma","db":"postgresql","skipDbChecks":"true","dbHost":"127.0.0.1","dbPort":"5432","dbUser":"postgres","dbPass":"postgres","dbName":"cfa_test_79352_16938","dbFile":"test-foo","testing":"none","pm":"yarn","ci":"actions","deployServer":"pm2","deployBranch":"master","serverSourcePath":"/srv/api-servert-test","staticHosting":"vercel","serverless":"lambda"}'
Hash: 9a0e861ee69160589d77
Version: webpack 4.46.0
Time: 4377ms
Built at: 02/23/2021 2:05:22 PM
     Asset      Size  Chunks               Chunk Names
8806abf.js  1.49 KiB       1  [immutable]  runtime
99368a1.js  3.76 KiB       0  [immutable]  app
Entrypoint app = 8806abf.js 99368a1.js

ERROR in ./node_modules/.cache/nuxt/client.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: /home/luma/workspace/foo-1/node_modules/.cache/nuxt/client.js: Cannot find module '@babel/preset-env/lib/utils'
Require stack:
- /home/luma/workspace/foo-1/node_modules/@nuxt/babel-preset-app/src/polyfills-plugin.js
- /home/luma/workspace/foo-1/node_modules/@nuxt/babel-preset-app/src/index.js
- /home/luma/workspace/foo-1/node_modules/@babel/core/lib/config/files/module-types.js
- /home/luma/workspace/foo-1/node_modules/@babel/core/lib/config/files/configuration.js
- /home/luma/workspace/foo-1/node_modules/@babel/core/lib/config/files/index.js
- /home/luma/workspace/foo-1/node_modules/@babel/core/lib/index.js
- /home/luma/workspace/foo-1/node_modules/babel-loader/lib/index.js
- /home/luma/workspace/foo-1/node_modules/loader-runner/lib/loadLoader.js
- /home/luma/workspace/foo-1/node_modules/loader-runner/lib/LoaderRunner.js
- /home/luma/workspace/foo-1/node_modules/webpack/lib/NormalModule.js
- /home/luma/workspace/foo-1/node_modules/webpack/lib/NormalModuleFactory.js
- /home/luma/workspace/foo-1/node_modules/webpack/lib/Compiler.js
- /home/luma/workspace/foo-1/node_modules/webpack/lib/webpack.js
- /home/luma/workspace/foo-1/node_modules/@nuxt/webpack/dist/webpack.js
- /home/luma/workspace/foo-1/node_modules/@nuxt/builder/dist/builder.js
- /home/luma/workspace/foo-1/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at n (/home/luma/workspace/foo-1/node_modules/jiti/dist/v8cache.js:2:2364)
    at PluginPass.Program (/home/luma/workspace/foo-1/node_modules/@nuxt/babel-preset-app/src/polyfills-plugin.js:15:34)
    at newFn (/home/luma/workspace/foo-1/node_modules/@babel/traverse/lib/visitors.js:175:21)
    at NodePath._call (/home/luma/workspace/foo-1/node_modules/@babel/traverse/lib/path/context.js:55:20)
    at NodePath.call (/home/luma/workspace/foo-1/node_modules/@babel/traverse/lib/path/context.js:42:17)
    at NodePath.visit (/home/luma/workspace/foo-1/node_modules/@babel/traverse/lib/path/context.js:92:31)
    at TraversalContext.visitQueue (/home/luma/workspace/foo-1/node_modules/@babel/traverse/lib/context.js:116:16)
    at TraversalContext.visitSingle (/home/luma/workspace/foo-1/node_modules/@babel/traverse/lib/context.js:85:19)
    at TraversalContext.visit (/home/luma/workspace/foo-1/node_modules/@babel/traverse/lib/context.js:144:19)
    at Function.traverse.node (/home/luma/workspace/foo-1/node_modules/@babel/traverse/lib/index.js:82:17)
    at traverse (/home/luma/workspace/foo-1/node_modules/@babel/traverse/lib/index.js:62:12)
    at transformFile (/home/luma/workspace/foo-1/node_modules/@babel/core/lib/transformation/index.js:107:29)
    at transformFile.next (<anonymous>)
 @ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js app[1]

 FATAL  Nuxt build error                                                                                     14:05:22

  at WebpackBundler.webpackCompile (node_modules/@nuxt/webpack/dist/webpack.js:2125:21)
  at processTicksAndRejections (internal/process/task_queues.js:93:5)
  at WebpackBundler.build (node_modules/@nuxt/webpack/dist/webpack.js:2074:5)
  at Builder.build (node_modules/@nuxt/builder/dist/builder.js:327:5)
  at ensureBuild (node_modules/@nuxt/cli/dist/cli-generate.js:145:3)
  at Object.run (node_modules/@nuxt/cli/dist/cli-generate.js:283:7)
  at NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-index.js:413:7)


   ╭─────────────────────────────╮
   │                             │
   │   ✖ Nuxt Fatal Error        │
   │                             │
   │   Error: Nuxt build error   │
   │                             │
   ╰─────────────────────────────╯

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build:client" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

  • Package version: v0.25.0
  • OS:
    • Linux
    • Windows
    • macOS
  • Node.js version: v14.15.4
  • npm version: 6.14.11

Additional context

yarn add @babel/preset-env は解決せず。そもそも '@babel/preset-env/lib/utils' はほんとにない。何だろう‥

@LumaKernel
Copy link
Contributor Author

nuxt/nuxt#8882

これっぽいです

@LumaKernel
Copy link
Contributor Author

nuxt 2.15.2 にて依存をpinすることで一旦解決されたようです。
試してみたらこの問題は解決されていそうでした。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant