Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Library throws errors on clean install #592

@bruceweir

Description

@bruceweir

Bug description

When using this library with a clean React application, the application throws fatal errors in the browser.

To Reproduce

  1. npx create-react-app mytestapp
  2. cd mytestapp
  3. npm install -S @inrupt/solid-ui-react
  4. cd src
  5. Add the line import { SessionProvider, LoginButton } from "@inrupt/solid-ui-react"; at the top of the App.js file.
  6. npm start

Expected result

The default React app should appear in the browser

Actual result

The following text appears in the browser:

Compiled with problems:

ERROR in ./node_modules/readable-stream/lib/_stream_readable.js 46:13-37

Module not found: Error: Can't resolve 'buffer' in 'C:\Users\brucew\test\mytestapp\node_modules\readable-stream\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "buffer": require.resolve("buffer/") }'
	- install 'buffer'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "buffer": false }


ERROR in ./node_modules/readable-stream/lib/_stream_writable.js 70:13-37

Module not found: Error: Can't resolve 'buffer' in 'C:\Users\brucew\test\mytestapp\node_modules\readable-stream\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "buffer": require.resolve("buffer/") }'
	- install 'buffer'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "buffer": false }


ERROR in ./node_modules/readable-stream/lib/internal/streams/buffer_list.js 74:15-32

Module not found: Error: Can't resolve 'buffer' in 'C:\Users\brucew\test\mytestapp\node_modules\readable-stream\lib\internal\streams'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "buffer": require.resolve("buffer/") }'
	- install 'buffer'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "buffer": false }


ERROR in ./node_modules/safe-buffer/index.js 2:13-30

Module not found: Error: Can't resolve 'buffer' in 'C:\Users\brucew\test\mytestapp\node_modules\safe-buffer'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "buffer": require.resolve("buffer/") }'
	- install 'buffer'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "buffer": false }

Environment

Please run

npx envinfo --system --npmPackages --binaries --npmGlobalPackages --browsers

in your project folder and paste the output here:

$ npx envinfo --system --npmPackages --binaries --npmGlobalPackages --browsers

System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 4.59 GB / 15.86 GB
Binaries:
Node: 14.18.1 - C:\Program Files\nodejs\node.EXE
npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 99.0.4844.51
Edge: Spartan (44.18362.449.0)
Internet Explorer: 11.0.18362.1
npmGlobalPackages:
firebase-tools: 10.2.2
grunt-cli: 1.4.2
npm-check-updates: 12.5.3
npm-windows-upgrade: 6.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions