[GH-ISSUE #2999] [bug]: Docker Compose Backend container always restarting #973

Closed
opened 2026-03-16 17:53:41 +03:00 by kerem · 10 comments
Owner

Originally created by @cristianorevil on GitHub (Apr 18, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2999

Originally assigned to: @balub, @anwarulislam on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I have cloned the repository, copied the .env.example file to .env and changed with custom settings

Running docker compose up -ad the backend container is build but continous restarting with following error:

hoppscotch-backend | node:internal/modules/cjs/loader:958
hoppscotch-backend | throw err;
hoppscotch-backend | ^
hoppscotch-backend |
hoppscotch-backend | Error: Cannot find module '/usr/src/app/dist/main'
hoppscotch-backend | at Module._resolveFilename (node:internal/modules/cjs/loader:955:15)
hoppscotch-backend | at Module._load (node:internal/modules/cjs/loader:803:27)
hoppscotch-backend | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
hoppscotch-backend | at node:internal/main/run_main_module:18:47 {
hoppscotch-backend | code: 'MODULE_NOT_FOUND',
hoppscotch-backend | requireStack: []
hoppscotch-backend | }

Steps to reproduce

Clone repository
Copy .env.example to .env
Execute docker compose up -d

Environment

Production

Version

Self-hosted

Originally created by @cristianorevil on GitHub (Apr 18, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2999 Originally assigned to: @balub, @anwarulislam on GitHub. ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior I have cloned the repository, copied the .env.example file to .env and changed with custom settings Running docker compose up -ad the backend container is build but continous restarting with following error: hoppscotch-backend | node:internal/modules/cjs/loader:958 hoppscotch-backend | throw err; hoppscotch-backend | ^ hoppscotch-backend | hoppscotch-backend | Error: Cannot find module '/usr/src/app/dist/main' hoppscotch-backend | at Module._resolveFilename (node:internal/modules/cjs/loader:955:15) hoppscotch-backend | at Module._load (node:internal/modules/cjs/loader:803:27) hoppscotch-backend | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) hoppscotch-backend | at node:internal/main/run_main_module:18:47 { hoppscotch-backend | code: 'MODULE_NOT_FOUND', hoppscotch-backend | requireStack: [] hoppscotch-backend | } ### Steps to reproduce Clone repository Copy .env.example to .env Execute docker compose up -d ### Environment Production ### Version Self-hosted
kerem 2026-03-16 17:53:41 +03:00
Author
Owner

@balub commented on GitHub (Apr 18, 2023):

Hey @cristianorevil , before running the docker compose up -d can you run pnpm i .

<!-- gh-comment-id:1512960216 --> @balub commented on GitHub (Apr 18, 2023): Hey @cristianorevil , before running the `docker compose up -d` can you run `pnpm i` .
Author
Owner

@beerkeeper commented on GitHub (May 8, 2023):

Hi, I'm trying to play around with the docker containers as well via the docker-compose command.
I can replicate @cristianorevil 's problem. The backend container restarts for the same reason MODULE_NOT_FOUND.

I'm on Ubuntu 23.04, node v18.13.0, pnpm v8.4.0

@balub when I run pnpm i in the project directory, I get the following output:

~/projects/hoppscotch$ pnpm i
Scope: all 10 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +2366
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/beerkeeper/.local/share/pnpm/store/v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 2366, reused 2312, downloaded 0, added 2366, done
 EACCES  EACCES: permission denied, symlink '../../../node_modules/.pnpm/cross-env@7.0.3/node_modules/cross-env' -> '/home/beerkeeper/projects/hoppscotch/packages/hoppscotch-backend/node_modules/cross-env'

pnpm: EACCES: permission denied, symlink '../../../node_modules/.pnpm/cross-env@7.0.3/node_modules/cross-env' -> '/home/beerkeeper/projects/hoppscotch/packages/hoppscotch-backend/node_modules/cross-env'
 WARN  Local dependency not found at /home/beerkeeper/projects/hoppscotch/packages/hoppscotch-backend/@types/nestjs/jwt

I'm not familiar with pnpm in general, so I might have something wrongfully set up to work with pnpm (tried both via the pnpm install script and the package from npm installed globally).

The build itself goes fine during docker compose build --nocache hoppscotch-backend

/projects/hoppscotch$ docker compose build --no-cache hoppscotch-backend
[+] Building 94.6s (14/14) FINISHED                                                                                            
 => [internal] load .dockerignore                                                                                         0.0s
 => => transferring context: 2B                                                                                           0.0s
 => [internal] load build definition from Dockerfile                                                                      0.0s
 => => transferring dockerfile: 558B                                                                                      0.0s
 => [internal] load metadata for docker.io/library/node:18.8.0                                                            0.7s
 => [builder 1/9] FROM docker.io/library/node:18.8.0@sha256:a0a2fc4435b0c9ae7bec0a69b1279323a4a41c5a005581fbf30d39cd5777  0.0s
 => [internal] load build context                                                                                         0.0s
 => => transferring context: 14.96kB                                                                                      0.0s
 => CACHED [builder 2/9] WORKDIR /usr/src/app                                                                             0.0s
 => [builder 3/9] RUN npm i -g pnpm                                                                                       2.0s
 => [builder 4/9] COPY .env .                                                                                             0.1s
 => [builder 5/9] COPY pnpm-lock.yaml .                                                                                   0.1s
 => [builder 6/9] RUN pnpm fetch                                                                                         41.3s
 => [builder 7/9] COPY ./packages/hoppscotch-backend .                                                                    0.1s
 => [builder 8/9] RUN pnpm i --filter hoppscotch-backend                                                                 35.0s 
 => [builder 9/9] RUN pnpm exec prisma generate                                                                           2.0s 
 => exporting to image                                                                                                   13.3s 
 => => exporting layers                                                                                                  13.2s 
 => => writing image sha256:3b8cc1216ce5021b1ac9e3af00eec4dae1f6c36422d511401abe31784864c114                              0.0s 
 => => naming to docker.io/library/hoppscotch-hoppscotch-backend                                                          0.0s

Hope it helps. If you need more information, please let me know!

<!-- gh-comment-id:1539055619 --> @beerkeeper commented on GitHub (May 8, 2023): Hi, I'm trying to play around with the docker containers as well via the docker-compose command. I can replicate @cristianorevil 's problem. The backend container restarts for the same reason MODULE_NOT_FOUND. I'm on Ubuntu 23.04, node v18.13.0, pnpm v8.4.0 @balub when I run `pnpm i` in the project directory, I get the following output: ``` ~/projects/hoppscotch$ pnpm i Scope: all 10 workspace projects Lockfile is up to date, resolution step is skipped Packages: +2366 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Packages are hard linked from the content-addressable store to the virtual store. Content-addressable store is at: /home/beerkeeper/.local/share/pnpm/store/v3 Virtual store is at: node_modules/.pnpm Progress: resolved 2366, reused 2312, downloaded 0, added 2366, done  EACCES  EACCES: permission denied, symlink '../../../node_modules/.pnpm/cross-env@7.0.3/node_modules/cross-env' -> '/home/beerkeeper/projects/hoppscotch/packages/hoppscotch-backend/node_modules/cross-env' pnpm: EACCES: permission denied, symlink '../../../node_modules/.pnpm/cross-env@7.0.3/node_modules/cross-env' -> '/home/beerkeeper/projects/hoppscotch/packages/hoppscotch-backend/node_modules/cross-env'  WARN  Local dependency not found at /home/beerkeeper/projects/hoppscotch/packages/hoppscotch-backend/@types/nestjs/jwt ``` I'm not familiar with pnpm in general, so I might have something wrongfully set up to work with pnpm (tried both via the pnpm install script and the package from npm installed globally). The build itself goes fine during `docker compose build --nocache hoppscotch-backend` ``` /projects/hoppscotch$ docker compose build --no-cache hoppscotch-backend [+] Building 94.6s (14/14) FINISHED => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 558B 0.0s => [internal] load metadata for docker.io/library/node:18.8.0 0.7s => [builder 1/9] FROM docker.io/library/node:18.8.0@sha256:a0a2fc4435b0c9ae7bec0a69b1279323a4a41c5a005581fbf30d39cd5777 0.0s => [internal] load build context 0.0s => => transferring context: 14.96kB 0.0s => CACHED [builder 2/9] WORKDIR /usr/src/app 0.0s => [builder 3/9] RUN npm i -g pnpm 2.0s => [builder 4/9] COPY .env . 0.1s => [builder 5/9] COPY pnpm-lock.yaml . 0.1s => [builder 6/9] RUN pnpm fetch 41.3s => [builder 7/9] COPY ./packages/hoppscotch-backend . 0.1s => [builder 8/9] RUN pnpm i --filter hoppscotch-backend 35.0s => [builder 9/9] RUN pnpm exec prisma generate 2.0s => exporting to image 13.3s => => exporting layers 13.2s => => writing image sha256:3b8cc1216ce5021b1ac9e3af00eec4dae1f6c36422d511401abe31784864c114 0.0s => => naming to docker.io/library/hoppscotch-hoppscotch-backend 0.0s ``` Hope it helps. If you need more information, please let me know!
Author
Owner

@balub commented on GitHub (May 9, 2023):

@beerkeeper It seems that EACCES permissions errors have something to do with system permissions may I suggest you run the pnpm i with sudo as in sudo pnpm i and try again. You can refer to these post and this from npm while we look into it.

<!-- gh-comment-id:1539625339 --> @balub commented on GitHub (May 9, 2023): @beerkeeper It seems that EACCES permissions errors have something to do with system permissions may I suggest you run the `pnpm i ` with `sudo` as in `sudo pnpm i` and try again. You can refer to these [post](https://stackoverflow.com/questions/48910876/error-eacces-permission-denied-access-usr-local-lib-node-modules) and [this](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) from npm while we look into it.
Author
Owner

@beerkeeper commented on GitHub (May 9, 2023):

@beerkeeper It seems that EACCES permissions errors have something to do with system permissions may I suggest you run the pnpm i with sudo as in sudo pnpm i and try again. You can refer to these post and this from npm while we look into it.

I can confirm that this does work! Just for anyone else that runs into this issue: You also need to install pnpm globally as the root user. I don't think it is best practice, but you mentioned that it is being looked into 👍🏻

The steps (execute within the root of the project):

  • sudo npm i -g pnpm
  • sudo pnpm i
  • docker compose up -> I didn't need to rebuild the backend image afterwards
<!-- gh-comment-id:1539884646 --> @beerkeeper commented on GitHub (May 9, 2023): > @beerkeeper It seems that EACCES permissions errors have something to do with system permissions may I suggest you run the `pnpm i ` with `sudo` as in `sudo pnpm i` and try again. You can refer to these [post](https://stackoverflow.com/questions/48910876/error-eacces-permission-denied-access-usr-local-lib-node-modules) and [this](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) from npm while we look into it. I can confirm that this does work! Just for anyone else that runs into this issue: You also need to install pnpm globally as the root user. I don't think it is best practice, but you mentioned that it is being looked into 👍🏻 The steps (execute within the root of the project): * `sudo npm i -g pnpm` * `sudo pnpm i` * `docker compose up` -> I didn't need to rebuild the backend image afterwards
Author
Owner

@Number16BusShelter commented on GitHub (May 11, 2023):

it seems like using sudo is not a good practice.
And why is it required to do install if this step is done on docker build?

<!-- gh-comment-id:1544384135 --> @Number16BusShelter commented on GitHub (May 11, 2023): it seems like using sudo is not a good practice. And why is it required to do install if this step is done on docker build?
Author
Owner

@jackiewu commented on GitHub (May 16, 2023):

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I have cloned the repository, copied the .env.example file to .env and changed with custom settings

Running docker compose up -ad the backend container is build but continous restarting with following error:

hoppscotch-backend | node:internal/modules/cjs/loader:958 hoppscotch-backend | throw err; hoppscotch-backend | ^ hoppscotch-backend | hoppscotch-backend | Error: Cannot find module '/usr/src/app/dist/main' hoppscotch-backend | at Module._resolveFilename (node:internal/modules/cjs/loader:955:15) hoppscotch-backend | at Module._load (node:internal/modules/cjs/loader:803:27) hoppscotch-backend | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) hoppscotch-backend | at node:internal/main/run_main_module:18:47 { hoppscotch-backend | code: 'MODULE_NOT_FOUND', hoppscotch-backend | requireStack: [] hoppscotch-backend | }

Steps to reproduce

Clone repository Copy .env.example to .env Execute docker compose up -d

Environment

Production

Version

Self-hosted

my solution is comment the following line at docker-compose.yml, hope this can help you
image
github.com/hoppscotch/hoppscotch@d6c8400116/docker-compose.yml (L22)

<!-- gh-comment-id:1548973360 --> @jackiewu commented on GitHub (May 16, 2023): > ### Is there an existing issue for this? > * [x] I have searched the existing issues > > ### Current behavior > I have cloned the repository, copied the .env.example file to .env and changed with custom settings > > Running docker compose up -ad the backend container is build but continous restarting with following error: > > hoppscotch-backend | node:internal/modules/cjs/loader:958 hoppscotch-backend | throw err; hoppscotch-backend | ^ hoppscotch-backend | hoppscotch-backend | Error: Cannot find module '/usr/src/app/dist/main' hoppscotch-backend | at Module._resolveFilename (node:internal/modules/cjs/loader:955:15) hoppscotch-backend | at Module._load (node:internal/modules/cjs/loader:803:27) hoppscotch-backend | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) hoppscotch-backend | at node:internal/main/run_main_module:18:47 { hoppscotch-backend | code: 'MODULE_NOT_FOUND', hoppscotch-backend | requireStack: [] hoppscotch-backend | } > > ### Steps to reproduce > Clone repository Copy .env.example to .env Execute docker compose up -d > > ### Environment > Production > > ### Version > Self-hosted my solution is comment the following line at docker-compose.yml, hope this can help you <img width="560" alt="image" src="https://github.com/hoppscotch/hoppscotch/assets/1164959/bee8b249-1d17-476b-9957-c157a0fbf1eb"> https://github.com/hoppscotch/hoppscotch/blob/d6c840011616317ba98f143da61b8f38bc1f5fc2/docker-compose.yml#L22
Author
Owner

@zucchiniEvader commented on GitHub (May 16, 2023):

When I execute sudo pnpm i, I encounter the following error.Do you know about this issue?

packages/hoppscotch-ui postinstall$ pnpm run build
│ > @hoppscotch/ui@0.0.1 build /Users/spike/github/hoppscotch/packages/hoppscotch-ui
│ > vite build
│ vite v3.2.6 building for production...
│ transforming...
│ ✓ 5 modules transformed.
│ [vite:dts] Start generate declaration files...
│ [vite:dts] A error occurred when transform code, maybe there are some inertnal bugs.
│ [vite:dts] Declaration files built in 2173ms.
│ [vite:dts] Unexpected token (6:2)
│ file: /Users/spike/github/hoppscotch/packages/hoppscotch-ui/src/components/smart/Anchor.vue:6:2
│ error during build:
│ SyntaxError: Unexpected token (6:2)
│     at instantiate (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:653:32)
│     at constructor (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:946:12)
│     at TypeScriptParserMixin.raise (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:3270:19)
│     at TypeScriptParserMixin.unexpected (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:3300:16)
│     at TypeScriptParserMixin.parsePropertyName (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:11847:18)
│     at TypeScriptParserMixin.parsePropertyDefinition (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:11710:22)
│     at TypeScriptParserMixin.parseObjectLike (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:11649:21)
│     at TypeScriptParserMixin.parseExprAtom (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:11159:23)
│     at TypeScriptParserMixin.parseExprSubscripts (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10872:23)
│     at TypeScriptParserMixin.parseUpdate (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10855:21)
│     at TypeScriptParserMixin.parseMaybeUnary (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10831:23)
│     at TypeScriptParserMixin.parseMaybeUnary (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9754:18)
│     at TypeScriptParserMixin.parseMaybeUnaryOrPrivate (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10669:61)
│     at TypeScriptParserMixin.parseExprOps (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10674:23)
│     at TypeScriptParserMixin.parseMaybeConditional (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10651:23)
│     at TypeScriptParserMixin.parseMaybeAssign (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10612:21)
│     at TypeScriptParserMixin.parseMaybeAssign (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9701:20)
│     at /Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10582:39
│     at TypeScriptParserMixin.allowInAnd (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12257:12)
│     at TypeScriptParserMixin.parseMaybeAssignAllowIn (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10582:17)
│     at TypeScriptParserMixin.parseExprListItem (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12009:18)
│     at TypeScriptParserMixin.parseCallExpressionArguments (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:11064:22)
│     at TypeScriptParserMixin.parseCoverCallAndAsyncArrowHead (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10979:29)
│     at TypeScriptParserMixin.parseSubscript (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10914:19)
│     at TypeScriptParserMixin.parseSubscript (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9239:18)
│     at TypeScriptParserMixin.parseSubscripts (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10885:19)
│     at TypeScriptParserMixin.parseExprSubscripts (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10876:17)
│     at TypeScriptParserMixin.parseUpdate (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10855:21)
│     at TypeScriptParserMixin.parseMaybeUnary (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10831:23)
│     at TypeScriptParserMixin.parseMaybeUnary (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9754:18)
│     at TypeScriptParserMixin.parseMaybeUnaryOrPrivate (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10669:61)
│     at TypeScriptParserMixin.parseExprOps (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10674:23)
│     at TypeScriptParserMixin.parseMaybeConditional (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10651:23)
│     at TypeScriptParserMixin.parseMaybeAssign (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10612:21)
│     at TypeScriptParserMixin.parseMaybeAssign (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9701:20)
│     at /Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10582:39
│     at TypeScriptParserMixin.allowInAnd (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12252:16)
│     at TypeScriptParserMixin.parseMaybeAssignAllowIn (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10582:17)
│     at TypeScriptParserMixin.parseExportDefaultExpression (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:13758:22)
│     at TypeScriptParserMixin.parseExportDefaultExpression (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9358:18)
│     at TypeScriptParserMixin.parseExport (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:13663:25)
│     at TypeScriptParserMixin.parseExport (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9341:20)
│     at TypeScriptParserMixin.parseStatementContent (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12661:27)
│     at TypeScriptParserMixin.parseStatementContent (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9398:18)
│     at TypeScriptParserMixin.parseStatementLike (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12549:17)
│     at TypeScriptParserMixin.parseModuleItem (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12526:17)
│     at TypeScriptParserMixin.parseBlockOrModuleBlockBody (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:13121:36)
│     at TypeScriptParserMixin.parseBlockBody (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:13114:10)
│     at TypeScriptParserMixin.parseProgram (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12437:10)
│     at TypeScriptParserMixin.parseTopLevel (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12427:25)
│  ELIFECYCLE  Command failed with exit code 1.
└─ Failed in 5.6s
<!-- gh-comment-id:1549309696 --> @zucchiniEvader commented on GitHub (May 16, 2023): > When I execute `sudo pnpm i`, I encounter the following error.Do you know about this issue? ``` packages/hoppscotch-ui postinstall$ pnpm run build │ > @hoppscotch/ui@0.0.1 build /Users/spike/github/hoppscotch/packages/hoppscotch-ui │ > vite build │ vite v3.2.6 building for production... │ transforming... │ ✓ 5 modules transformed. │ [vite:dts] Start generate declaration files... │ [vite:dts] A error occurred when transform code, maybe there are some inertnal bugs. │ [vite:dts] Declaration files built in 2173ms. │ [vite:dts] Unexpected token (6:2) │ file: /Users/spike/github/hoppscotch/packages/hoppscotch-ui/src/components/smart/Anchor.vue:6:2 │ error during build: │ SyntaxError: Unexpected token (6:2) │ at instantiate (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:653:32) │ at constructor (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:946:12) │ at TypeScriptParserMixin.raise (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:3270:19) │ at TypeScriptParserMixin.unexpected (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:3300:16) │ at TypeScriptParserMixin.parsePropertyName (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:11847:18) │ at TypeScriptParserMixin.parsePropertyDefinition (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:11710:22) │ at TypeScriptParserMixin.parseObjectLike (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:11649:21) │ at TypeScriptParserMixin.parseExprAtom (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:11159:23) │ at TypeScriptParserMixin.parseExprSubscripts (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10872:23) │ at TypeScriptParserMixin.parseUpdate (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10855:21) │ at TypeScriptParserMixin.parseMaybeUnary (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10831:23) │ at TypeScriptParserMixin.parseMaybeUnary (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9754:18) │ at TypeScriptParserMixin.parseMaybeUnaryOrPrivate (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10669:61) │ at TypeScriptParserMixin.parseExprOps (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10674:23) │ at TypeScriptParserMixin.parseMaybeConditional (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10651:23) │ at TypeScriptParserMixin.parseMaybeAssign (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10612:21) │ at TypeScriptParserMixin.parseMaybeAssign (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9701:20) │ at /Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10582:39 │ at TypeScriptParserMixin.allowInAnd (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12257:12) │ at TypeScriptParserMixin.parseMaybeAssignAllowIn (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10582:17) │ at TypeScriptParserMixin.parseExprListItem (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12009:18) │ at TypeScriptParserMixin.parseCallExpressionArguments (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:11064:22) │ at TypeScriptParserMixin.parseCoverCallAndAsyncArrowHead (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10979:29) │ at TypeScriptParserMixin.parseSubscript (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10914:19) │ at TypeScriptParserMixin.parseSubscript (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9239:18) │ at TypeScriptParserMixin.parseSubscripts (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10885:19) │ at TypeScriptParserMixin.parseExprSubscripts (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10876:17) │ at TypeScriptParserMixin.parseUpdate (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10855:21) │ at TypeScriptParserMixin.parseMaybeUnary (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10831:23) │ at TypeScriptParserMixin.parseMaybeUnary (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9754:18) │ at TypeScriptParserMixin.parseMaybeUnaryOrPrivate (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10669:61) │ at TypeScriptParserMixin.parseExprOps (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10674:23) │ at TypeScriptParserMixin.parseMaybeConditional (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10651:23) │ at TypeScriptParserMixin.parseMaybeAssign (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10612:21) │ at TypeScriptParserMixin.parseMaybeAssign (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9701:20) │ at /Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10582:39 │ at TypeScriptParserMixin.allowInAnd (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12252:16) │ at TypeScriptParserMixin.parseMaybeAssignAllowIn (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:10582:17) │ at TypeScriptParserMixin.parseExportDefaultExpression (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:13758:22) │ at TypeScriptParserMixin.parseExportDefaultExpression (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9358:18) │ at TypeScriptParserMixin.parseExport (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:13663:25) │ at TypeScriptParserMixin.parseExport (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9341:20) │ at TypeScriptParserMixin.parseStatementContent (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12661:27) │ at TypeScriptParserMixin.parseStatementContent (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:9398:18) │ at TypeScriptParserMixin.parseStatementLike (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12549:17) │ at TypeScriptParserMixin.parseModuleItem (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12526:17) │ at TypeScriptParserMixin.parseBlockOrModuleBlockBody (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:13121:36) │ at TypeScriptParserMixin.parseBlockBody (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:13114:10) │ at TypeScriptParserMixin.parseProgram (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12437:10) │ at TypeScriptParserMixin.parseTopLevel (/Users/spike/github/hoppscotch/node_modules/.pnpm/@babel+parser@7.21.8/node_modules/@babel/parser/lib/index.js:12427:25) │  ELIFECYCLE  Command failed with exit code 1. └─ Failed in 5.6s ```
Author
Owner

@webysther commented on GitHub (May 29, 2023):

#3092
#3093

<!-- gh-comment-id:1567461717 --> @webysther commented on GitHub (May 29, 2023): [#3092](https://github.com/hoppscotch/hoppscotch/issues/3092) [#3093](https://github.com/hoppscotch/hoppscotch/issues/3093)
Author
Owner

@forresthopkinsa commented on GitHub (Jul 10, 2023):

Unfortunately, running pnpm as root is not an acceptable solution in most environments. Can we figure out why it's trying to write to ../../../? This is very weird behavior that seems specific to Hoppscotch

Edit: The EACCES isn't happening because of the ../../../, it's happening because of the target. hoppscotch/packages/hoppscotch-backend/node_modules was owned by root for some reason – maybe docker-compose did this? Not sure. chown fixed the problem.

<!-- gh-comment-id:1629776285 --> @forresthopkinsa commented on GitHub (Jul 10, 2023): Unfortunately, running pnpm as root is not an acceptable solution in most environments. Can we figure out why it's trying to write to `../../../`? This is very weird behavior that seems specific to Hoppscotch Edit: The EACCES isn't happening because of the `../../../`, it's happening because of the target. `hoppscotch/packages/hoppscotch-backend/node_modules` was owned by root for some reason – maybe docker-compose did this? Not sure. `chown` fixed the problem.
Author
Owner

@AndrewBastin commented on GitHub (Sep 6, 2023):

Closing this issue due to inactivity. Please do check if the 2023.8.0 release has this issue still and reopen if so.

<!-- gh-comment-id:1708675968 --> @AndrewBastin commented on GitHub (Sep 6, 2023): Closing this issue due to inactivity. Please do check if the 2023.8.0 release has this issue still and reopen if so.
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/hoppscotch#973
No description provided.