2

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)

3
  • 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. Commented Apr 19, 2020 at 14:35
  • What do you mean exacly? Commented Apr 19, 2020 at 14:45
  • 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! Commented Apr 19, 2020 at 18:03

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.