[英]property signin, sign up does not exist on type AuthService
授權.controller 文件 授權服務文件 我是初學者級別並且即使刪除所有代碼以簡單返回消息也會出現此類錯誤我的 vcode 給出相同的錯誤可能是什么問題 ...
[英]property signin, sign up does not exist on type AuthService
授權.controller 文件 授權服務文件 我是初學者級別並且即使刪除所有代碼以簡單返回消息也會出現此類錯誤我的 vcode 給出相同的錯誤可能是什么問題 ...
[英]failed to upload image in nestjs
我是后端新手,尤其是 nodejs,我使用 nestjs 作為框架。 我想將我上傳的文件的名稱https://mydomain/files/example-image.png ,但出現如下錯誤: 這是我命名文件的代碼: 這種方式錯了嗎? 有沒有特定的文件命名方式? 請幫我解決這個問題。 ...
[英]NestJS compilerOptions assets wrong path
我真的不知道如何解釋它,但基本上我有郵件資源需要的 .hbs 文件。 通常,當我運行npm start run:dev時,它們不會被復制到dist文件夾中。 所以我這樣修改了nest-cli.json 。 但是現在我遇到了問題,他們復制到的補丁不正確。 這就是我在根文件夾中的方式: 這是它被復制 ...
[英]NestJS: How to build and deploy the nestJS app only with javascript
我在 Javascript 中實現了一個沒有 TS 支持的 NestJS 應用程序。 我想部署它。 我想知道如何才能做到這一點。 所有文檔都指出了如何使用typescript來做到這一點。使用nest build命令,在本文中提到。 但是沒有適當的文檔來使用 Javascript 實現此目的。這里還 ...
[英]I want to build NestJS app in javascript language but it give some error on tsconfig.json
你能幫我用 javascript 語言構建 nestjs 嗎? 我用“nest new --language js new-app-name”創建了 nestjs 應用程序,我想將它部署到 vercel 中。 我嘗試使用 nest build 進行構建,但它顯示如下錯誤消息:“錯誤無法找到 Type ...
[英]ConfigService is undefined while running testcases in Nest.js
我在本地運行 nestjs 服務器,如果我用 postman 測試它工作正常。 但是當我運行測試用例時,ConfigService 變得未定義! 應用程序模塊.ts 配置.ts app-deploy.controller.spec.ts 在服務文件中,configService.get('app ...
[英]difference between two ways of applying validation pipe to nest.js
我在 nest.js 中找到了應用驗證管道的代碼。 有兩種不同的方法可以全局應用驗證管道。 我無法弄清楚它們之間的區別。 它是什么? 提前致謝。 方法一 方法二 ...
[英]yarn start:dev not working, not changes the code - Nest.js
在此處輸入圖像描述即使我更改代碼,我的代碼也會返回相同的值我想知道發生了什么 ...
[英]NestJS lifecycle methods invoked without implementing their interface
我有一個關於 NestJS 的小問題。 在我的代碼中,有一個服務看起來像: ` ` 然后在我的 main.ts 文件中,我調用了這個方法: ` ` 如您所見,我的服務既沒有實現 onApplicationBootstrap 也沒有實現 onApplicationShutdown。 為什么仍然 ...
[英]Unable to set headers in nestjs
我正在學習 nest.js 並且我很難設置響應標頭.. 這是代碼片段 我可以在終端運行中看到日志。 當我在 google chrome 中打開 .network 選項卡以驗證標頭時,我沒有看到任何東西。 我正在關注本教程:: https://youtu.be/F_oOtaxb0L8?t=1530 ...
[英]How use seeding options in MikroOrm with nestJs?
我在 nestJs 中使用 MikroOrm,並在package.json中添加了以下腳本 這些是配置 在編寫npm run orm seeder:run --class=ClassNameSeeder時,我需要指定一個特定的種子文件,如文檔所述,但出現以下錯誤 我還嘗試在package.json ...
[英]NestJS - gRPC Client E2E Test
我正在嘗試為具有 gRPC 客戶端的 NestJS 微服務編寫端到端測試。 無論我如何嘗試在 e2e 測試中模擬 ClientsModule,它似乎仍然無法獲取配置並且無法找到 *.proto 文件。 請在下面找到我的代碼示例: app.module.ts 中的客戶端模塊 // src/app.m ...
[英]How to compare password when using bcrypt nest js log in api in mysql
我如何在使用 bcrypt 登錄時比較密碼,我在登錄時遇到問題比較密碼。從 select 查詢我可以獲得匹配的 mailid 但如何獲得 hash 密碼???????? ???????? 注意:我沒有使用 typeorm ... 這是我的 service.ts 代碼, 控制器.ts 我在登錄比較密碼 ...
[英]Nestjs: Repl with monorepo mode
我有一個使用monorepo 模式的 Nest 應用程序。 我想利用 nest 9.0+ 中發布的新repl功能。 我的目錄結構如下所示: 應用/ --inventory-ops/src/app.module --ticket-office/src/app.module 我已按照創建 repl. ...
[英]How to use character '#' in @nest/config ".env.dev"?
有沒有辦法在.env.dev 文件中使用' # '? 我的 MySQL 密碼有“ # ” 此代碼識別為“mypass” ...
[英]NestJS Kafka Microservice with REST Endpoints
我是 NestJS 的新手,想知道是否有可能擁有一個帶有 REST 端點的 NestJS Kafka 微服務(最好使用 Fastify)。 我已經為 Kafka 和 Fastify 找到了以下配置,但似乎你只能在同一個服務中使用一個或另一個。 // kafka config const app = ...
[英]How do I access process.env.* from @nestjs/config in my Strategy service constructor?
我嘗試在 app.modele.ts 中設置 isGlobal: true 但 process.env.* 返回未定義。@Module({ imports: [ ConfigModule.forRoot({ isGlobal: true, envFilePath ...
[英]Getting error when replace HttpService from @nestjs/common to @nestjs/axios
將 HttpService 從 nestjs@common 切換到 nestjs/axios 時出錯。 關於響應和請求。 “AxiosRequestConfig”類型的參數不可分配給“AxiosRequestConfig”類型的參數。 屬性“方法”的類型不兼容。 類型“字符串”不可分配給類型“方法 ...
[英]NestJS App won't use the .env or configService PORT. Always starts on port 3000 no matter what
我有一個准系統 NestJS 應用程序,我所做的只是添加一個.env文件,內容為PORT=3001 ,然后根據NestJS 文檔修改我的main.ts :import { ConfigService } from '@nestjs/config'; import { NestFactory } fr ...
[英]NestJS: Raw SQL query execution with mssql. Too Slow. Configuration problems?
Nestjs 中連接到 SQL 服務器數據庫的 APP。 所有查詢都寫在數據庫端,因此它們之間的連接是使用簡單的原始 SQL 和使用 mssql package。 事情是這樣的:當我在 SSMS 中運行時,會在幾毫秒內執行一個非常小的查詢(比如說 <20 條記錄)。 (甚至更大更復雜的查 ...