1
votes

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)

1
It is against the SO rules to link something because sometime in the future the link will be broken and your question and the answer will not be understood. - Preston
What do you mean exacly? - Andrzej
You must put all the information that you linked to inside your question. Or someone will give you a down arrow because you aren't following the rules. Most people on SO are very nice and helpful, but there are some who are not. Welcome to SO! - Preston

1 Answers

2
votes

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.