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 convert undefined or null to object #588

Closed
mikearnaldi opened this issue Jul 11, 2022 · 2 comments
Closed

Cannot convert undefined or null to object #588

mikearnaldi opened this issue Jul 11, 2022 · 2 comments
Labels
bug Something isn't working needs repro Needs an example to reproduce

Comments

@mikearnaldi
Copy link

mikearnaldi commented Jul 11, 2022

Version

0.1.3

Platform

Linux effectts-core-n6b55uqvpg8 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:54:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

What steps will reproduce the bug?

git clone https://github.com/Effect-TS/core.git
git checkout a024ff335b8cde6ee636a0de68fc1ca9b71369c3
cd core
yarn build-all
cd packages/core/build/examples
bun fib.js

How often does it reproduce? Is there a required condition?

deterministic, every run

What is the expected behavior?

to work like with node fib.js

What do you see instead?

135 |     }
136 |   }
137 | 
138 |   _append(a1) {
139 |     const binary = this.binary && isByte(a1);
140 |     const buffer = this.binary && binary ? alloc(BufferSize) : tsplus_module_1.alloc(BufferSize);
                                               ^
 TypeError: Cannot convert undefined or null to object
      at _append (/workspace/core/node_modules/@tsplus/stdlib/_mjs/collections/Chunk/definition.mjs:140:43)
      at range (/workspace/core/node_modules/@tsplus/stdlib/_mjs/collections/Chunk/range.mjs:13:14)
      at exponential (/workspace/core/packages/core/build/esm/io/Metrics/Boundaries.js:49:44)
      at /workspace/core/packages/core/build/esm/io/Fiber/_internal/context.js:96:75

Additional information

No response

@mikearnaldi mikearnaldi added bug Something isn't working needs repro Needs an example to reproduce labels Jul 11, 2022
@Jarred-Sumner
Copy link
Collaborator

Jarred-Sumner commented Nov 1, 2022

This bug has been fixed in v0.2.2 or earlier (probably a lot earlier)

❯ bun fib.js
[1.78ms] FIB10

image

That being said, Bun attempts to use the TypeScript files from tsconfig.json "paths" unless the src folder is removed. Loading the TypeScript files fails because Hash is a global or (more likely) part of a TS namespace which Bun doesn't yet support all the way

@mikearnaldi
Copy link
Author

This bug has been fixed in v0.2.2 or earlier (probably a lot earlier)

❯ bun fib.js
[1.78ms] FIB10
image

That being said, Bun attempts to use the TypeScript files from tsconfig.json "paths" unless the src folder is removed. Loading the TypeScript files fails because Hash is a global or (more likely) part of a TS namespace which Bun doesn't yet support all the way

As I mentioned before it would be appropriate for Bun to have a config flag to disable TS, not everybody wants to use Bun for compiling TS for example anyone wanting to use compiler plugins won't be able to use use Bun to compile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs repro Needs an example to reproduce
Projects
None yet
Development

No branches or pull requests

2 participants