Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use library - Bundling errors #110

Open
ollyde opened this issue Nov 8, 2021 · 1 comment
Open

Cannot use library - Bundling errors #110

ollyde opened this issue Nov 8, 2021 · 1 comment

Comments

@ollyde
Copy link

ollyde commented Nov 8, 2021

After installing the library I get the following errors.

No idea what the solution is. :-/

Pre-bundling dependencies:
  svelte
  @apollo/client
  svelte/animate
  svelte/easing
  svelte/internal
  (...and 3 more)
(this will be run only when your dependencies or config have changed)
 > node_modules/@apollo/client/react/hooks/useReactiveVar.js:1:36: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
    1 │ import { useEffect, useState } from 'react';
      ╵                                     ~~~~~~~

 > node_modules/@apollo/client/react/context/ApolloContext.js:1:23: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
    1 │ import * as React from 'react';
      ╵                        ~~~~~~~

 > node_modules/@apollo/client/react/context/ApolloConsumer.js:2:23: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
    2 │ import * as React from 'react';
      ╵                        ~~~~~~~

 > node_modules/@apollo/client/react/hooks/useApolloClient.js:2:23: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
    2 │ import * as React from 'react';
      ╵                        ~~~~~~~

 > node_modules/@apollo/client/react/context/ApolloProvider.js:2:23: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
    2 │ import * as React from 'react';
      ╵                        ~~~~~~~

 > node_modules/@apollo/client/react/hooks/useMutation.js:2:56: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
    2 │ import { useContext, useState, useRef, useEffect } from 'react';
      ╵                                                         ~~~~~~~

 > node_modules/@apollo/client/react/hooks/useSubscription.js:3:68: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
    3 │ import { useContext, useState, useRef, useEffect, useReducer } from 'react';
      ╵                                                                     ~~~~~~~

 > node_modules/@apollo/client/react/hooks/utils/useBaseQuery.js:3:58: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
    3 │ import { useContext, useEffect, useReducer, useRef } from 'react';
      ╵                                                           ~~~~~~~

 > node_modules/@apollo/client/react/hooks/utils/useAfterFastRefresh.js:2:34: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
    2 │ import { useEffect, useRef } from "react";
      ╵                                   ~~~~~~~

 > node_modules/@apollo/client/react/hooks/utils/useDeepMemo.js:1:23: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
    1 │ import { useRef } from 'react';
      ╵                        ~~~~~~~

error when starting dev server:
Error: Build failed with 10 errors:
node_modules/@apollo/client/react/context/ApolloConsumer.js:2:23: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
node_modules/@apollo/client/react/context/ApolloContext.js:1:23: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
node_modules/@apollo/client/react/context/ApolloProvider.js:2:23: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
node_modules/@apollo/client/react/hooks/useApolloClient.js:2:23: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
node_modules/@apollo/client/react/hooks/useMutation.js:2:56: error: Could not resolve "react" (mark it as external to exclude it from the bundle)
...
    at failureErrorWithLog (/Users/technotechno/Downloads/webrtc-test/node_modules/esbuild/lib/main.js:1493:15)
    at /Users/technotechno/Downloads/webrtc-test/node_modules/esbuild/lib/main.js:1151:28
    at runOnEndCallbacks (/Users/technotechno/Downloads/webrtc-test/node_modules/esbuild/lib/main.js:941:63)
    at buildResponseToResult (/Users/technotechno/Downloads/webrtc-test/node_modules/esbuild/lib/main.js:1149:7)
    at /Users/technotechno/Downloads/webrtc-test/node_modules/esbuild/lib/main.js:1258:14
    at /Users/technotechno/Downloads/webrtc-test/node_modules/esbuild/lib/main.js:629:9
    at handleIncomingPacket (/Users/technotechno/Downloads/webrtc-test/node_modules/esbuild/lib/main.js:726:9)
    at Socket.readFromStdout (/Users/technotechno/Downloads/webrtc-test/node_modules/esbuild/lib/main.js:596:7)
    at Socket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:324:12)
@ollyde ollyde changed the title Cannot use library Cannot use library - Bundling errors Nov 8, 2021
@cesargdm
Copy link

cesargdm commented Nov 19, 2021

See #82 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants