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

src/main.ts:2:28 - error TS2307: Cannot find module 'ep_etherpad-lite/node/types/MapType.ts' or its corresponding type declarations. #6672

Closed
iogeda opened this issue Sep 23, 2024 · 8 comments

Comments

@iogeda
Copy link

iogeda commented Sep 23, 2024

Describe the bug
src/main.ts:2:28 - error TS2307: Cannot find module 'ep_etherpad-lite/node/types/MapType.ts' or its corresponding type declarations.

To Reproduce
Steps to reproduce the behavior:

  1. Run pnpm run build:etherpad

Server (please complete the following information):

  • Etherpad version:2.2.5
  • OS: windows server 2016
  • Node.js version (node --version):Node.js v20.17.0
  • npm version (npm --version):npm@10.8.2
  • Is the server free of plugins: no
@simevo
Copy link

simevo commented Sep 23, 2024

same here on debian bookworm (12) with node v18.19.0:

$ pnpm run build:etherpad

> etherpad@2.2.5 build:etherpad /opt/etherpad-lite
> pnpm --filter admin run build-copy && pnpm --filter ui run build-copy


> admin@2.2.5 build-copy /opt/etherpad-lite/admin
> tsc && vite build --outDir ../src/templates/admin --emptyOutDir

vite v5.4.7 building for production...
✓ 1708 modules transformed.
computing gzip size (2)...[vite-plugin-static-copy] Copied 1 items.
../src/templates/admin/index.html                   0.49 kB │ gzip:   0.30 kB
../src/templates/admin/assets/index-DlI1vhja.css   10.88 kB │ gzip:   3.19 kB
../src/templates/admin/assets/index-B3eGjvS4.js   418.35 kB │ gzip: 134.48 kB
✓ built in 8.06s

> ui@0.0.0 build-copy /opt/etherpad-lite/ui
> tsc && vite build --outDir ../src/static/oidc --emptyOutDir

src/main.ts:2:28 - error TS2307: Cannot find module 'ep_etherpad-lite/node/types/MapType.ts' or its corresponding type declarations.

2 import {MapArrayType} from "ep_etherpad-lite/node/types/MapType.ts";
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in src/main.ts:2

/opt/etherpad-lite/ui:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  ui@0.0.0 build-copy: `tsc && vite build --outDir ../src/static/oidc --emptyOutDir`
Exit status 2
 ELIFECYCLE  Command failed with exit code 2.

@simevo
Copy link

simevo commented Sep 23, 2024

oops! for me it tuned out I had accidentally delete files in src/node 😊

@iogeda
Copy link
Author

iogeda commented Sep 23, 2024

This question has been confusing me for a week. I have just started working on this project.

@SamTV12345
Copy link
Member

How did you download Etherpad?

@iogeda
Copy link
Author

iogeda commented Sep 24, 2024

How did you download Etherpad?
git clone

@iogeda
Copy link
Author

iogeda commented Sep 24, 2024

How did you download Etherpad?

Clone the repository: git clone -b master . and it is ui/src/main.ts

How did you download Etherpad?

$ pnpm run build:etherpad

etherpad@2.2.5 build:etherpad /opt/etherpad-lite
pnpm --filter admin run build-copy && pnpm --filter ui run build-copy

admin@2.2.5 build-copy /opt/etherpad-lite/admin
tsc && vite build --outDir ../src/templates/admin --emptyOutDir

vite v5.4.7 building for production...
✓ 1708 modules transformed.
computing gzip size (2)...[vite-plugin-static-copy] Copied 1 items.
../src/templates/admin/index.html 0.49 kB │ gzip: 0.30 kB
../src/templates/admin/assets/index-DlI1vhja.css 10.88 kB │ gzip: 3.19 kB
../src/templates/admin/assets/index-B3eGjvS4.js 418.35 kB │ gzip: 134.48 kB
✓ built in 8.06s

ui@0.0.0 build-copy /opt/etherpad-lite/ui
tsc && vite build --outDir ../src/static/oidc --emptyOutDir

src/main.ts:2:28 - error TS2307: Cannot find module 'ep_etherpad-lite/node/types/MapType.ts' or its corresponding type declarations.

2 import {MapArrayType} from "ep_etherpad-lite/node/types/MapType.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error in src/main.ts:2

/opt/etherpad-lite/ui:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  ui@0.0.0 build-copy: tsc && vite build --outDir ../src/static/oidc --emptyOutDir
Exit status 2
 ELIFECYCLE  Command failed with exit code 2.

same problem .

@SamTV12345
Copy link
Member

pnpm run build:etherpad

I did that and it worked. I have no idea why the MapType is missing for you. It should be on the system in the mentioned folder.

C:\Users\samue\Downloads\etherpad-master>git clone -b master https://github.com/ether/etherpad-lite.git
Cloning into 'etherpad-lite'...
remote: Enumerating objects: 65892, done.
remote: Counting objects: 100% (6546/6546), done.
remote: Compressing objects: 100% (676/676), done.
remote: Total 65892 (delta 6067), reused 6149 (delta 5866), pack-reused 59346 (from 1)
Receiving objects: 100% (65892/65892), 39.95 MiB | 23.66 MiB/s, done.
Resolving deltas: 100% (48970/48970), done.

C:\Users\samue\Downloads\etherpad-master>pnpm i
 ERR_PNPM_NO_PKG_MANIFEST  No package.json found in C:\Users\samue\Downloads\etherpad-master

C:\Users\samue\Downloads\etherpad-master>cd etherpad-lite

C:\Users\samue\Downloads\etherpad-master\etherpad-lite>pnpm i
Scope: all 6 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +927
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

   ╭──────────────────────────────────────────────────────────────────╮
   │                                                                  │
   │                Update available! 9.9.0 → 9.11.0.                 │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v9.11.0   │
   │                Run "pnpm self-update" to update.                 │
   │                                                                  │
   │         Follow @pnpmjs for updates: https://x.com/pnpmjs         │
   │                                                                  │
   ╰──────────────────────────────────────────────────────────────────╯

Progress: resolved 927, reused 895, downloaded 32, added 927, done
node_modules/.pnpm/vue-demi@0.14.10_vue@3.4.38_typescript@5.6.2_/node_modules/vue-demi: Running postinstall script, done in 124ms

dependencies:
+ ep_etherpad-lite 2.2.5 <- src

devDependencies:
+ admin 2.2.5 <- admin
+ docs <- doc
+ ui 0.0.0 <- ui

Done in 15.5s

C:\Users\samue\Downloads\etherpad-master\etherpad-lite>pnpm run build:etherpad

> etherpad@2.2.5 build:etherpad C:\Users\samue\Downloads\etherpad-master\etherpad-lite
> pnpm --filter admin run build-copy && pnpm --filter ui run build-copy


> admin@2.2.5 build-copy C:\Users\samue\Downloads\etherpad-master\etherpad-lite\admin
> tsc && vite build --outDir ../src/templates/admin --emptyOutDir

vite v5.4.7 building for production...
✓ 1708 modules transformed.
computing gzip size (2)...[vite-plugin-static-copy] Copied 1 items.
../src/templates/admin/index.html                   0.49 kB │ gzip:   0.30 kB
../src/templates/admin/assets/index-DlI1vhja.css   10.88 kB │ gzip:   3.19 kB
../src/templates/admin/assets/index-B3eGjvS4.js   418.35 kB │ gzip: 134.87 kB
✓ built in 3.09s

> ui@0.0.0 build-copy C:\Users\samue\Downloads\etherpad-master\etherpad-lite\ui
> tsc && vite build --outDir ../src/static/oidc --emptyOutDir

vite v5.4.7 building for production...
✓ 6 modules transformed.
../src/static/oidc/consent.html               1.01 kB │ gzip: 0.49 kB
../src/static/oidc/login.html                 2.60 kB │ gzip: 1.02 kB
../src/static/oidc/assets/style-Bg-wvjxN.css  1.58 kB │ gzip: 0.75 kB
../src/static/oidc/assets/main-DnmqwYeI.js    0.15 kB │ gzip: 0.15 kB
../src/static/oidc/assets/style-Dnfg2NQt.js   0.71 kB │ gzip: 0.40 kB
../src/static/oidc/assets/nested-BvZBmoGC.js  1.06 kB │ gzip: 0.53 kB
✓ built in 86ms

@iogeda
Copy link
Author

iogeda commented Sep 25, 2024

i know it . thank you .

@iogeda iogeda closed this as completed Sep 25, 2024
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

3 participants