Reputation: 33
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
@Module({
imports: [
GraphQLModule.forRoot({
autoSchemaFile: 'schema.gql',
playground: true,
installSubscriptionHandlers: true,
}),
],
})
export class AppModule {}
Hello I have problem that I didn't find any solution for it. I've created nestjs project ( nest new ) and then I instaled some packages form NestJS documentation ( npm i --save @nestjs/graphql graphql-tools graphql apollo-server-express) But after add a GraphQLModule to module imports, I get an error.
internal/modules/cjs/loader.js:625 throw e; ^ Error: No valid exports main found for '/Users/Andrzej/Downloads/WebApps/Testing/becker-app-master-api/api/node_modules/extract-files'
at Object. (/Users/Andrzej/Downloads/WebApps/Testing/becker-app-master-api/api/node_modules/apollo-upload-client/lib/index.js:21:17)
Upvotes: 2
Views: 3052
Reputation: 154
I searched the issues of the package generating the error. To quote https://github.com/jaydenseric/extract-files/issues/13
This package uses the final Node.js conditional exports API
Node.js v13.0.0 - v13.6 will not work as those versions support package exports but not conditional exports.
Node.js v13.7+ will work fine, and all v10 and v12 versions should work.
Upvotes: 2