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

不能启动Server服务 #1

Closed
ygmpkk opened this issue Nov 13, 2023 · 1 comment
Closed

不能启动Server服务 #1

ygmpkk opened this issue Nov 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ygmpkk
Copy link

ygmpkk commented Nov 13, 2023

操作系统:macOS 13.4 (22F66)
Node版本:v16.19.0

问题描述:

warning package.json: No license field
$ npm run copy && npm run launch

> survey-template@1.0.0 copy
> cp -rf ./src/ ./build/


> survey-template@1.0.0 launch
> npm run build && SERVER_ENV=local node ./build/index.js


> survey-template@1.0.0 build
> tsc

src/apps/security/db/mongo.ts:1:51 - error TS2307: Cannot find module 'mongodb' or its corresponding type declarations.

1 import { Collection, MongoClient, ObjectId } from 'mongodb'
                                                    ~~~~~~~~~

src/apps/surveyManage/db/mongo.ts:1:51 - error TS2307: Cannot find module 'mongodb' or its corresponding type declarations.

1 import { Collection, MongoClient, ObjectId } from 'mongodb'
                                                    ~~~~~~~~~

src/apps/surveyManage/index.ts:8:23 - error TS2307: Cannot find module 'joi' or its corresponding type declarations.

8 import * as Joi  from 'joi'
                        ~~~~~

src/apps/surveyManage/service/surveyService.ts:6:20 - error TS2307: Cannot find module 'lodash' or its corresponding type declarations.

6 import * as _ from "lodash";
                     ~~~~~~~~

src/apps/surveyManage/service/surveyService.ts:7:25 - error TS2307: Cannot find module 'moment' or its corresponding type declarations.

7 import * as moment from "moment";
                          ~~~~~~~~

src/apps/surveyManage/utils/index.ts:4:23 - error TS2307: Cannot find module 'joi' or its corresponding type declarations.

4 import * as Joi  from 'joi'
                        ~~~~~

src/apps/surveyPublish/db/mongo.ts:1:51 - error TS2307: Cannot find module 'mongodb' or its corresponding type declarations.

1 import { Collection, MongoClient, ObjectId } from 'mongodb'
                                                    ~~~~~~~~~

src/apps/surveyPublish/index.ts:7:22 - error TS2307: Cannot find module 'joi' or its corresponding type declarations.

7 import * as Joi from 'joi'
                       ~~~~~

src/apps/surveyPublish/service/surveySubmitService.ts:5:25 - error TS2307: Cannot find module 'moment' or its corresponding type declarations.

5 import * as moment from 'moment'
                          ~~~~~~~~

src/apps/surveyPublish/utils/index.ts:3:23 - error TS2307: Cannot find module 'joi' or its corresponding type declarations.

3 import * as Joi  from 'joi'
                        ~~~~~

src/apps/user/db/mongo.ts:1:51 - error TS2307: Cannot find module 'mongodb' or its corresponding type declarations.

1 import { Collection, MongoClient, ObjectId } from 'mongodb'
                                                    ~~~~~~~~~

src/apps/user/index.ts:3:22 - error TS2307: Cannot find module 'joi' or its corresponding type declarations.

3 import * as Joi from 'joi'
                       ~~~~~

src/apps/user/service/userService.ts:4:8 - error TS2307: Cannot find module 'jsonwebtoken' or its corresponding type declarations.

4 } from 'jsonwebtoken';
         ~~~~~~~~~~~~~~

src/apps/user/utils/index.ts:3:23 - error TS2307: Cannot find module 'joi' or its corresponding type declarations.

3 import * as Joi  from 'joi'
                        ~~~~~


Found 14 errors in 13 files.

Errors  Files
     1  src/apps/security/db/mongo.ts:1
     1  src/apps/surveyManage/db/mongo.ts:1
     1  src/apps/surveyManage/index.ts:8
     2  src/apps/surveyManage/service/surveyService.ts:6
     1  src/apps/surveyManage/utils/index.ts:4
     1  src/apps/surveyPublish/db/mongo.ts:1
     1  src/apps/surveyPublish/index.ts:7
     1  src/apps/surveyPublish/service/surveySubmitService.ts:5
     1  src/apps/surveyPublish/utils/index.ts:3
     1  src/apps/user/db/mongo.ts:1
     1  src/apps/user/index.ts:3
     1  src/apps/user/service/userService.ts:4
     1  src/apps/user/utils/index.ts:3
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@sudoooooo
Copy link
Collaborator

@ygmpkk 感谢反馈~
我们已修正此类问题,可以pull最新内容进行使用。

@ygmpkk ygmpkk closed this as completed Nov 14, 2023
@sudoooooo sudoooooo added the bug Something isn't working label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants