你好,我的同事们!
所以我已经在这个应用程序上工作了一段时间了。我喜欢更新我使用的框架,所以当框架发布新版本时,我会定期更新。即角9> 10。角10 > 11。
所以我最近更新了角度11,更新了我的nestjs和nx。现在,当我尝试使用我的前端应用程序时,艾薇似乎抱怨很多。但是..。罗得..。关于前端应用程序中没有使用的模块。
Warning: ./node_modules/@nestjs/common/utils/load-package.util.js 9:39-59
Critical dependency: the request of a dependency is an expression
Warning: ./node_modules/@nestjs/core/helpers/optional-require.js 6:39-59
Critical dependency: the request of a dependency is an expression
Warning: ./node_modules/@nestjs/core/helpers/load-adapter.js 9:39-63
Critical dependency: the request of a dependency is an expression
Warning: ./node_modules/express/lib/view.js 81:13-25
Critical dependency: the request of a dependency is an expression
Warning: /Users/user/Projects/workspace/libs/stacks-dto/src/lib/user.dto.ts depends on '@nestjs/mongoose'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsRgbColor.js depends on 'validator/lib/isRgbColor'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsPostalCode.js depends on 'validator/lib/isPostalCode'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsSemVer.js depends on 'validator/lib/isSemVer'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsRFC3339.js depends on 'validator/lib/isRFC3339'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsOctal.js depends on 'validator/lib/isOctal'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsLocale.js depends on 'validator/lib/isLocale'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsMagnetURI.js depends on 'validator/lib/isMagnetURI'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsPassportNumber.js depends on 'validator/lib/isPassportNumber'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsMimeType.js depends on 'validator/lib/isMimeType'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsISRC.js depends on 'validator/lib/isISRC'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsIdentityCard.js depends on 'validator/lib/isIdentityCard'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsIBAN.js depends on 'validator/lib/isIBAN'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsEthereumAddress.js depends on 'validator/lib/isEthereumAddress'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsHSL.js depends on 'validator/lib/isHSL'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsEAN.js depends on 'validator/lib/isEAN'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsBtcAddress.js depends on 'validator/lib/isBtcAddress'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsDataURI.js depends on 'validator/lib/isDataURI'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsBIC.js depends on 'validator/lib/isBIC'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsNumberString.js depends on 'validator/lib/isNumeric'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsBase32.js depends on 'validator/lib/isBase32'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsBooleanString.js depends on 'validator/lib/isBoolean'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsISSN.js depends on 'validator/lib/isISSN'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsHash.js depends on 'validator/lib/isHash'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsMilitaryTime.js depends on 'validator/lib/matches'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/MinLength.js depends on 'validator/lib/isLength'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsUUID.js depends on 'validator/lib/isUUID'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsUppercase.js depends on 'validator/lib/isUppercase'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsMongoId.js depends on 'validator/lib/isMongoId'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsUrl.js depends on 'validator/lib/isURL'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsMultibyte.js depends on 'validator/lib/isMultibyte'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsSurrogatePair.js depends on 'validator/lib/isSurrogatePair'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha3.js depends on 'validator/lib/isISO31661Alpha3'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha2.js depends on 'validator/lib/isISO31661Alpha2'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsMobilePhone.js depends on 'validator/lib/isMobilePhone'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
[39[39mmWarning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsJWT.js depends on 'validator/lib/isJWT'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsLowercase.js depends on 'validator/lib/isLowercase'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsJSON.js depends on 'validator/lib/isJSON'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsISO8601.js depends on 'validator/lib/isISO8601'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsISIN.js depends on 'validator/lib/isISIN'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsISBN.js depends on 'validator/lib/isISBN'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsPort.js depends on 'validator/lib/isPort'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsIP.js depends on 'validator/lib/isIP'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsHexColor.js depends on 'validator/lib/isHexColor'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsHexadecimal.js depends on 'validator/lib/isHexadecimal'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsVariableWidth.js depends on 'validator/lib/isVariableWidth'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsMacAddress.js depends on 'validator/lib/isMACAddress'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsHalfWidth.js depends on 'validator/lib/isHalfWidth'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsFQDN.js depends on 'validator/lib/isFQDN'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsEmail.js depends on 'validator/lib/isEmail'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsCreditCard.js depends on 'validator/lib/isCreditCard'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
[9[39m3mWarning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsByteLength.js depends on 'validator/lib/isByteLength'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsFullWidth.js depends on 'validator/lib/isFullWidth'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsCurrency.js depends on 'validator/lib/isCurrency'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/NotContains.js depends on 'validator/lib/contains'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsBase64.js depends on 'validator/lib/isBase64'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsDecimal.js depends on 'validator/lib/isDecimal'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsAlpha.js depends on 'validator/lib/isAlpha'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsAscii.js depends on 'validator/lib/isAscii'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/string/IsAlphanumeric.js depends on 'validator/lib/isAlphanumeric'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/number/IsDivisibleBy.js depends on 'validator/lib/isDivisibleBy'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /Users/user/Projects/workspace/node_modules/class-validator/esm2015/decorator/common/IsLatLong.js depends on 'validator/lib/isLatLong'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Error: ./node_modules/@nestjs/microservices/client/client-rmq.js
Module not found: Error: Can't resolve 'amqp-connection-manager' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/client'
Error: ./node_modules/@nestjs/microservices/server/server-rmq.js
Module not found: Error: Can't resolve 'amqp-connection-manager' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/server'
Error: ./node_modules/@nestjs/microservices/client/client-rmq.js
Module not found: Error: Can't resolve 'amqplib' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/client'
Error: ./node_modules/@nestjs/microservices/server/server-rmq.js
Module not found: Error: Can't resolve 'amqplib' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/server'
Error: ./node_modules/@nestjs/common/cache/cache.providers.js
Module not found: Error: Can't resolve 'cache-manager' in '/Users/user/Projects/workspace/node_modules/@nestjs/common/cache'
Error: ./node_modules/cookie-signature/index.js
Module not found: Error: Can't resolve 'crypto' in '/Users/user/Projects/workspace/node_modules/cookie-signature'
Error: ./node_modules/etag/index.js
Module not found: Error: Can't resolve 'crypto' in '/Users/user/Projects/workspace/node_modules/etag'
Error: ./node_modules/multer/storage/disk.js
Module not found: Error: Can't resolve 'crypto' in '/Users/user/Projects/workspace/node_modules/multer/storage'
Error: ./node_modules/busboy/lib/main.js
Module not found: Error: Can't resolve 'fs' in '/Users/user/Projects/workspace/node_modules/busboy/lib'
Error: ./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/user/Projects/workspace/node_modules/destroy'
Error: ./node_modules/etag/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/user/Projects/workspace/node_modules/etag'
Error: ./node_modules/express/lib/view.js
Module not found: Error: Can't resolve 'fs' in '/Users/user/Projects/workspace/node_modules/express/lib'
Error: ./node_modules/mime/mime.js
Module not found: Error: Can't resolve 'fs' in '/Users/user/Projects/workspace/node_modules/mime'
Error: ./node_modules/mkdirp/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/user/Projects/workspace/node_modules/mkdirp'
Error: ./node_modules/multer/storage/disk.js
Module not found: Error: Can't resolve 'fs' in '/Users/user/Projects/workspace/node_modules/multer/storage'
Error: ./node_modules/send/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/user/Projects/workspace/node_modules/send'
Error: ./node_modules/@nestjs/microservices/client/client-grpc.js
Module not found: Error: Can't resolve 'grpc' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/client'
Error: ./node_modules/@nestjs/microservices/server/server-grpc.js
Module not found: Error: Can't resolve 'grpc' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/server'
Error: ./node_modules/@nestjs/platform-express/adapters/express-adapter.js
Module not found: Error: Can't resolve 'http' in '/Users/user/Projects/workspace/node_modules/@nestjs/platform-express/adapters'
Error: ./node_modules/express/lib/response.js
Module not found: Error: Can't resolve 'http' in '/Users/user/Projects/workspace/node_modules/express/lib'
Error: ./node_modules/express/lib/request.js
Module not found: Error: Can't resolve 'http' in '/Users/user/Projects/workspace/node_modules/express/lib'
Error: ./node_modules/express/lib/application.js
Module not found: Error: Can't resolve 'http' in '/Users/user/Projects/workspace/node_modules/express/lib'
Error: ./node_modules/@nestjs/platform-express/adapters/express-adapter.js
Module not found: Error: Can't resolve 'https' in '/Users/user/Projects/workspace/node_modules/@nestjs/platform-express/adapters'
Error: ./node_modules/@nestjs/microservices/client/client-kafka.js
Module not found: Error: Can't resolve 'kafkajs' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/client'
Error: ./node_modules/@nestjs/microservices/helpers/kafka-reply-partition-assigner.js
Module not found: Error: Can't resolve 'kafkajs' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/helpers'
Error: ./node_modules/@nestjs/microservices/server/server-kafka.js
Module not found: Error: Can't resolve 'kafkajs' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/server'
Error: ./node_modules/@nestjs/microservices/client/client-mqtt.js
Module not found: Error: Can't resolve 'mqtt' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/client'
Error: ./node_modules/@nestjs/microservices/server/server-mqtt.js
Module not found: Error: Can't resolve 'mqtt' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/server'
Error: ./node_modules/@nestjs/microservices/client/client-nats.js
Module not found: Error: Can't resolve 'nats' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/client'
Error: ./node_modules/@nestjs/microservices/server/server-nats.js
Module not found: Error: Can't resolve 'nats' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/server'
Error: ./node_modules/@nestjs/microservices/client/client-tcp.js
Module not found: Error: Can't resolve 'net' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/client'
Error: ./node_modules/@nestjs/microservices/server/server-tcp.js
Module not found: Error: Can't resolve 'net' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/server'
Error: ./node_modules/express/lib/request.js
Module not found: Error: Can't resolve 'net' in '/Users/user/Projects/workspace/node_modules/express/lib'
Error: ./node_modules/@nestjs/core/nest-application.js
Module not found: Error: Can't resolve 'os' in '/Users/user/Projects/workspace/node_modules/@nestjs/core'
Error: ./node_modules/multer/storage/disk.js
Module not found: Error: Can't resolve 'os' in '/Users/user/Projects/workspace/node_modules/multer/storage'
Error: ./node_modules/content-disposition/index.js
Module not found: Error: Can't resolve 'path' in '/Users/user/Projects/workspace/node_modules/content-disposition'
Error: ./node_modules/express/lib/response.js
Module not found: Error: Can't resolve 'path' in '/Users/user/Projects/workspace/node_modules/express/lib'
Error: ./node_modules/express/lib/application.js
Module not found: Error: Can't resolve 'path' in '/Users/user/Projects/workspace/node_modules/express/lib'
Error: ./node_modules/express/lib/view.js
Module not found: Error: Can't resolve 'path' in '/Users/user/Projects/workspace/node_modules/express/lib'
Error: ./node_modules/mime/mime.js
Module not found: Error: Can't resolve 'path' in '/Users/user/Projects/workspace/node_modules/mime'
Error: ./node_modules/mime-types/index.js
Module not found: Error: Can't resolve 'path' in '/Users/user/Projects/workspace/node_modules/mime-types'
Error: ./node_modules/mkdirp/index.js
Module not found: Error: Can't resolve 'path' in '/Users/user/Projects/workspace/node_modules/mkdirp'
Error: ./node_modules/multer/storage/disk.js
Module not found: Error: Can't resolve 'path' in '/Users/user/Projects/workspace/node_modules/multer/storage'
Error: ./node_modules/send/index.js
Module not found: Error: Can't resolve 'path' in '/Users/user/Projects/workspace/node_modules/send'
Error: ./node_modules/serve-static/index.js
Module not found: Error: Can't resolve 'path' in '/Users/user/Projects/workspace/node_modules/serve-static'
Error: ./node_modules/@nestjs/microservices/client/client-redis.js
Module not found: Error: Can't resolve 'redis' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/client'
Error: ./node_modules/@nestjs/microservices/server/server-redis.js
Module not found: Error: Can't resolve 'redis' in '/Users/user/Projects/workspace/node_modules/@nestjs/microservices/server'
Error: ./node_modules/@nestjs/core/router/sse-stream.js
Module not found: Error: Can't resolve 'stream' in '/Users/user/Projects/workspace/node_modules/@nestjs/core/router'
Error: ./node_modules/busboy/lib/main.js
Module not found: Error: Can't resolve 'stream' in '/Users/user/Projects/workspace/node_modules/busboy/lib'
Error: ./node_modules/busboy/lib/types/multipart.js
Module not found: Error: Can't resolve 'stream' in '/Users/user/Projects/workspace/node_modules/busboy/lib/types'
Error: ./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'stream' in '/Users/user/Projects/workspace/node_modules/destroy'
Error: ./node_modules/dicer/lib/Dicer.js
Module not found: Error: Can't resolve 'stream' in '/Users/user/Projects/workspace/node_modules/dicer/lib'
Error: ./node_modules/dicer/lib/PartStream.js
Module not found: Error: Can't resolve 'stream' in '/Users/user/Projects/workspace/node_modules/dicer/lib'
Error: ./node_modules/readable-stream/readable.js
Module not found: Error: Can't resolve 'stream' in '/Users/user/Projects/workspace/node_modules/readable-stream'
Error: ./node_modules/readable-stream/lib/_stream_readable.js
Module not found: Error: Can't resolve 'stream' in '/Users/user/Projects/workspace/node_modules/readable-stream/lib'
Error: ./node_modules/readable-stream/lib/_stream_writable.js
Module not found: Error: Can't resolve 'stream' in '/Users/user/Projects/workspace/node_modules/readable-stream/lib'
Error: ./node_modules/send/index.js
Module not found: Error: Can't resolve 'stream' in '/Users/user/Projects/workspace/node_modules/send'
Error: ./node_modules/body-parser/lib/read.js
Module not found: Error: Can't resolve 'zlib' in '/Users/user/Projects/workspace/node_modules/body-parser/lib'所有这些依赖项都不在前端应用程序中使用。只在后端应用程序中。后端应用程序构建、编译和运行都很好。为什么艾薇这么紧张?
我完全赞成与你分享我的代码,但这不是我的问题所在。那我的问题是什么?
为什么常春藤抱怨模块不是前端应用程序的一部分?这是我需要改变的环境吗?
如果你需要更多的信息来回答我的问题,请问。
发布于 2021-03-28 15:10:22
在对这个项目进行了一天的回顾之后,我:
库的中间件导入类。
中后端的库
解决这些问题也符合最佳实践。
我已经将中间件中的类划分为两个类:一个用于前端,一个用于后端。我已经重构了代码,这样后端库在前端就没有必要了。最后我只修了两个文件。所有的错误都消失了。
因此,如果遇到类似的情况,请反复检查是否在前端使用某些后端库/类。
https://stackoverflow.com/questions/66833012
复制相似问题