Nest: FileFieldsInterceptor not found in v6.0.1

Created on 18 Mar 2019  路  8Comments  路  Source: nestjs/nest

[X ] Regression
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

The documentation says nothing of a name or package change for the "FileFieldsInterceptor", after I updated It gives me the following error:

error TS2305: Module '"../../../node_modules/@nestjs/common"' has no exported member 'FileFieldsInterceptor'.

   FileFieldsInterceptor,
    at createTSError (/app/node_modules/ts-node/src/index.ts:226:12)
    at getOutput (/app/node_modules/ts-node/src/index.ts:335:40)
    at Object.compile (/app/node_modules/ts-node/src/index.ts:368:11)
    at Module.m._compile (/app/node_modules/ts-node/src/index.ts:414:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/app/node_modules/ts-node/src/index.ts:417:12)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)

Expected behavior

It should not give any error

Nest version: 6.0.1

type

Most helpful comment

@pisix use @nestjs/platform-express, not @nestjs/common. I just updated the docs.

All 8 comments

I saw that it moved to a different package, the documentation should be updated anyway.

@Gustav0ar can you ellaborate to which package it was moved?

Ah I see ... you have to add a package for a specific platform. In the case if Multer that would be @nestjs/platform-express:

$ yarn add @nestjs/platform-express

FileFieldsInterceptor uses multer which is compatible only with express (thus it's exported from @nestjs/platform-express). I'll update docs shortly

FileInterceptor is not found too in v6.0.2 :(

@pisix use @nestjs/platform-express, not @nestjs/common. I just updated the docs.

@kamilmysliwiec Thank you for the quick reply

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KamGor picture KamGor  路  3Comments

menme95 picture menme95  路  3Comments

rlesniak picture rlesniak  路  3Comments

breitsmiley picture breitsmiley  路  3Comments

anyx picture anyx  路  3Comments