[GH-ISSUE #333] yarn errors in building the web ui #43

Closed
opened 2026-03-03 16:36:11 +03:00 by kerem · 2 comments
Owner

Originally created by @ilovefreesw on GitHub (Jan 2, 2024).
Original GitHub issue: https://github.com/NdoleStudio/httpsms/issues/333

yarn build
yarn run v1.22.21
$ nuxt build

 WARN  webpack@5.89.0 is installed but ^4.46.0 is expected                                                  6:56:43 pm


 WARN  Module @nuxtjs/stylelint-module is disabled due to incompatibility issues:                           6:56:43 pm
 - [bridge] Nuxt bridge is required


 WARN  No .env file found in /home/ilfs/Public/httpsms/web.                                     nuxt:dotenv 6:56:44 pm

ℹ Production build                                                                                         6:56:45 pm
ℹ Bundling for server and client side                                                                      6:56:45 pm
ℹ Target: static                                                                                           6:56:45 pm
ℹ Using components loader to optimize imports                                                              6:56:45 pm
ℹ Discovered Components: .nuxt/components/readme.md                                                        6:56:45 pm
✔ Builder initialized                                                                                      6:56:45 pm
✔ Nuxt files generated                                                                                     6:56:45 pm

 FATAL  Cannot find module 'typescript'                                                                     6:56:47 pm
Require stack:
- /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/typescript-reporter/TypeScriptReporterConfiguration.js
- /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPluginConfiguration.js
- /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPlugin.js
- /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/index.js
- /home/ilfs/Public/httpsms/web/node_modules/@nuxt/typescript-build/dist/index.js
- /home/ilfs/Public/httpsms/web/node_modules/@nuxt/core/dist/core.js

  Require stack:
  - node_modules/fork-ts-checker-webpack-plugin/lib/typescript-reporter/TypeScriptReporterConfiguration.js
  - node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPluginConfiguration.js
  - node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPlugin.js
  - node_modules/fork-ts-checker-webpack-plugin/lib/index.js
  - node_modules/@nuxt/typescript-build/dist/index.js
  - node_modules/@nuxt/core/dist/core.js
  at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
  at Function.resolve (node:internal/modules/helpers:187:19)
  at Object.createTypeScriptReporterConfiguration (node_modules/fork-ts-checker-webpack-plugin/lib/typescript-reporter/TypeScriptReporterConfiguration.js:16:70)
  at Object.createForkTsCheckerWebpackPluginConfiguration (node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPluginConfiguration.js:11:55)
  at ForkTsCheckerWebpackPlugin.apply (node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPlugin.js:47:73)
  at webpack (node_modules/@nuxt/webpack/node_modules/webpack/lib/webpack.js:51:13)
  at node_modules/@nuxt/webpack/dist/webpack.js:1821:24
  at Array.map (<anonymous>)
  at WebpackBundler.build (node_modules/@nuxt/webpack/dist/webpack.js:1820:37)
  at async Builder.build (node_modules/@nuxt/builder/dist/builder.js:249:5)


╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│                                                                                                                      ││   ✖ Nuxt Fatal Error                                                                                                 ││                                                                                                                      ││   Error: Cannot find module 'typescript'                                                                             ││   Require stack:                                                                                                     ││   -                                                                                                                  ││   /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/typescript-reporter/TypeScriptRepo   ││   rterConfiguration.js                                                                                               ││   -                                                                                                                  ││   /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPluginConfigur   ││   ation.js                                                                                                           ││   -                                                                                                                  ││   /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPlugin.js        ││   - /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/index.js                           ││   - /home/ilfs/Public/httpsms/web/node_modules/@nuxt/typescript-build/dist/index.js                                  ││   - /home/ilfs/Public/httpsms/web/node_modules/@nuxt/core/dist/core.js                                               ││                                                                                                                      │╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

error Command failed with exit code 1.

To fix this, I ran yarn add typescript

Now, after again building, I get this:

ilfs@ilfs80:~/Public/httpsms/web$ yarn dev
yarn run v1.22.21
$ nuxt

 WARN  webpack@5.89.0 is installed but ^4.46.0 is expected                                                  6:57:35 pm


 WARN  Module @nuxtjs/stylelint-module is disabled due to incompatibility issues:                           6:57:36 pm
 - [bridge] Nuxt bridge is required


 WARN  No .env file found in /home/ilfs/Public/httpsms/web.                                     nuxt:dotenv 6:57:36 pm


   ╭───────────────────────────────────────╮
   │                                       │
   │   Nuxt @ v2.17.2                      │
   │                                       │
   │   ▸ Environment: development          │
   │   ▸ Rendering:   server-side          │
   │   ▸ Target:      static               │
   │                                       │
   │   Listening: http://localhost:3000/   │
   │                                       │
   ╰───────────────────────────────────────╯

ℹ Preparing project for development                                                                        6:57:37 pm
ℹ Initial build may take a while                                                                           6:57:37 pm
ℹ Discovered Components: .nuxt/components/readme.md                                                        6:57:37 pm
✔ Builder initialized                                                                                      6:57:37 pm
✔ Nuxt files generated                                                                                     6:57:38 pm

✔ Client
  Compiled successfully in 1.58m

✔ Server
  Compiled successfully in 1.51m

ℹ Waiting for file changes                                                                                 6:59:14 pm
ℹ Memory usage: 1.18 GB (RSS: 1.41 GB)                                                                     6:59:14 pm
ℹ Listening on: http://localhost:3000/                                                                     6:59:14 pm
No issues found.                                                                            nuxt:typescript 6:59:15 pm

 ERROR  [Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'length')"    6:59:16 pm

found in

---> <WebsiteLayout> at layouts/website.vue
       <Root>
Originally created by @ilovefreesw on GitHub (Jan 2, 2024). Original GitHub issue: https://github.com/NdoleStudio/httpsms/issues/333 ``` yarn build yarn run v1.22.21 $ nuxt build WARN webpack@5.89.0 is installed but ^4.46.0 is expected 6:56:43 pm WARN Module @nuxtjs/stylelint-module is disabled due to incompatibility issues: 6:56:43 pm - [bridge] Nuxt bridge is required WARN No .env file found in /home/ilfs/Public/httpsms/web. nuxt:dotenv 6:56:44 pm ℹ Production build 6:56:45 pm ℹ Bundling for server and client side 6:56:45 pm ℹ Target: static 6:56:45 pm ℹ Using components loader to optimize imports 6:56:45 pm ℹ Discovered Components: .nuxt/components/readme.md 6:56:45 pm ✔ Builder initialized 6:56:45 pm ✔ Nuxt files generated 6:56:45 pm FATAL Cannot find module 'typescript' 6:56:47 pm Require stack: - /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/typescript-reporter/TypeScriptReporterConfiguration.js - /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPluginConfiguration.js - /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPlugin.js - /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/index.js - /home/ilfs/Public/httpsms/web/node_modules/@nuxt/typescript-build/dist/index.js - /home/ilfs/Public/httpsms/web/node_modules/@nuxt/core/dist/core.js Require stack: - node_modules/fork-ts-checker-webpack-plugin/lib/typescript-reporter/TypeScriptReporterConfiguration.js - node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPluginConfiguration.js - node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPlugin.js - node_modules/fork-ts-checker-webpack-plugin/lib/index.js - node_modules/@nuxt/typescript-build/dist/index.js - node_modules/@nuxt/core/dist/core.js at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15) at Function.resolve (node:internal/modules/helpers:187:19) at Object.createTypeScriptReporterConfiguration (node_modules/fork-ts-checker-webpack-plugin/lib/typescript-reporter/TypeScriptReporterConfiguration.js:16:70) at Object.createForkTsCheckerWebpackPluginConfiguration (node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPluginConfiguration.js:11:55) at ForkTsCheckerWebpackPlugin.apply (node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPlugin.js:47:73) at webpack (node_modules/@nuxt/webpack/node_modules/webpack/lib/webpack.js:51:13) at node_modules/@nuxt/webpack/dist/webpack.js:1821:24 at Array.map (<anonymous>) at WebpackBundler.build (node_modules/@nuxt/webpack/dist/webpack.js:1820:37) at async Builder.build (node_modules/@nuxt/builder/dist/builder.js:249:5) ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ ││ ✖ Nuxt Fatal Error ││ ││ Error: Cannot find module 'typescript' ││ Require stack: ││ - ││ /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/typescript-reporter/TypeScriptRepo ││ rterConfiguration.js ││ - ││ /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPluginConfigur ││ ation.js ││ - ││ /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPlugin.js ││ - /home/ilfs/Public/httpsms/web/node_modules/fork-ts-checker-webpack-plugin/lib/index.js ││ - /home/ilfs/Public/httpsms/web/node_modules/@nuxt/typescript-build/dist/index.js ││ - /home/ilfs/Public/httpsms/web/node_modules/@nuxt/core/dist/core.js ││ │╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ error Command failed with exit code 1. ``` To fix this, I ran `yarn add typescript` Now, after again building, I get this: ``` ilfs@ilfs80:~/Public/httpsms/web$ yarn dev yarn run v1.22.21 $ nuxt WARN webpack@5.89.0 is installed but ^4.46.0 is expected 6:57:35 pm WARN Module @nuxtjs/stylelint-module is disabled due to incompatibility issues: 6:57:36 pm - [bridge] Nuxt bridge is required WARN No .env file found in /home/ilfs/Public/httpsms/web. nuxt:dotenv 6:57:36 pm ╭───────────────────────────────────────╮ │ │ │ Nuxt @ v2.17.2 │ │ │ │ ▸ Environment: development │ │ ▸ Rendering: server-side │ │ ▸ Target: static │ │ │ │ Listening: http://localhost:3000/ │ │ │ ╰───────────────────────────────────────╯ ℹ Preparing project for development 6:57:37 pm ℹ Initial build may take a while 6:57:37 pm ℹ Discovered Components: .nuxt/components/readme.md 6:57:37 pm ✔ Builder initialized 6:57:37 pm ✔ Nuxt files generated 6:57:38 pm ✔ Client Compiled successfully in 1.58m ✔ Server Compiled successfully in 1.51m ℹ Waiting for file changes 6:59:14 pm ℹ Memory usage: 1.18 GB (RSS: 1.41 GB) 6:59:14 pm ℹ Listening on: http://localhost:3000/ 6:59:14 pm No issues found. nuxt:typescript 6:59:15 pm ERROR [Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'length')" 6:59:16 pm found in ---> <WebsiteLayout> at layouts/website.vue <Root> ```
kerem closed this issue 2026-03-03 16:36:12 +03:00
Author
Owner

@AchoArnold commented on GitHub (Jan 2, 2024):

@ilovefreesw Create a .env file. You can use this for inspiration.

https://github.com/NdoleStudio/httpsms/blob/main/web/.env.production

<!-- gh-comment-id:1873858720 --> @AchoArnold commented on GitHub (Jan 2, 2024): @ilovefreesw Create a `.env` file. You can use this for inspiration. https://github.com/NdoleStudio/httpsms/blob/main/web/.env.production
Author
Owner

@AchoArnold commented on GitHub (Jan 2, 2024):

See the build step here https://github.com/NdoleStudio/httpsms/blob/main/.github/workflows/ci.yml#L62

<!-- gh-comment-id:1873861393 --> @AchoArnold commented on GitHub (Jan 2, 2024): See the build step here https://github.com/NdoleStudio/httpsms/blob/main/.github/workflows/ci.yml#L62
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/httpsms#43
No description provided.