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

fix: detect process before use #172

Merged
merged 1 commit into from
Mar 1, 2022
Merged

Conversation

achingbrain
Copy link
Member

Access process as a property of globalThis instead of as a global
as parcel has stopped bundling the polyfill.

Fixes:

ipfs: @parcel/core: Failed to resolve 'process' from
ipfs: './node_modules/ipfs-utils/src/env.js'
ipfs:   /tmp/test-dependant-1646117523100/node_modules/ipfs-utils/src/env.js:10:57
ipfs:      9 | const IS_ELECTRON_RENDERER = IS_ELECTRON && IS_ENV_WITH_DOM
ipfs:   > 10 | peof process !== 'undefined' && typeof process.release !== 'undefined'
ipfs:   >    |      ^^^^^^^
ipfs:     11 | // @ts-ignore - we either ignore worker scope or dom scope
ipfs:     12 | const IS_WEBWORKER = typeof importScripts === 'function' && typeof self
ipfs: @parcel/resolver-default: Node builtin polyfill "process" is not installed, but
ipfs: auto install is disabled.

Access process as a property of `globalThis` instead of as a global
as parcel has stopped bundling the polyfill.

Fixes:

```
ipfs: @parcel/core: Failed to resolve 'process' from
ipfs: './node_modules/ipfs-utils/src/env.js'
ipfs:   /tmp/test-dependant-1646117523100/node_modules/ipfs-utils/src/env.js:10:57
ipfs:      9 | const IS_ELECTRON_RENDERER = IS_ELECTRON && IS_ENV_WITH_DOM
ipfs:   > 10 | peof process !== 'undefined' && typeof process.release !== 'undefined'
ipfs:   >    |      ^^^^^^^
ipfs:     11 | // @ts-ignore - we either ignore worker scope or dom scope
ipfs:     12 | const IS_WEBWORKER = typeof importScripts === 'function' && typeof self
ipfs: @parcel/resolver-default: Node builtin polyfill "process" is not installed, but
ipfs: auto install is disabled.
```
@achingbrain achingbrain merged commit 7aee4aa into master Mar 1, 2022
@achingbrain achingbrain deleted the fix/detect-process-before-use branch March 1, 2022 07:26
github-actions bot pushed a commit that referenced this pull request Mar 1, 2022
### [9.0.5](v9.0.4...v9.0.5) (2022-03-01)

### Bug Fixes

* detect process before use ([#172](#172)) ([7aee4aa](7aee4aa))
@github-actions
Copy link

github-actions bot commented Mar 1, 2022

🎉 This PR is included in version 9.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant