Comments (3)
Can you provide a repro?
This doesn't reproduce it:
import { yes } from "./space in imported file";
export function test() {
if (!yes) {
throw new Error("no");
}
return testDone(import.meta.url);
}
// space in imported file.js
export const yes = true;
from bun.
I meant in the path of the project itself, sorry for not being precise.
To reproduce simply copy one of your example in a directory that contain a space i.e.: /path/with some spaces/app
& insert a scripts in your package.json
project directory
/srv/projects/open source/examples/next
package.json
{
"name": "@bun-examples/next",
"version": "0.0.37",
"main": "index.js",
"scripts": {
"next": "next --help"
},
"dependencies": {
"next": "11.1.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-is": "^17.0.2"
},
"devDependencies": {
"@types/react": "^17.0.19",
"bun-framework-next": "^0.0.0-21",
"typescript": "^4.3.5"
},
"bun-create": {
"postinstall": [
"bun bun --use next"
]
}
}
bash
bun run next
$ next --help
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/srv/projects/open'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
As you can see bun is trying to find the module at /srv/projects/open
instead of /srv/projects/open source/examples/next
.
I tried to look around & I suspect the bug lies somewhere in resolve_path.zig or wherever you pass the base_path
/ current_path
arguments for the various functions within that file but to be honest I had never heard of zig before a few days ago so I'm not familiar at all with Zig & might be wrong.
from bun.
Haven’t forgotten about this, will get to it when I can
from bun.
Related Issues (20)
- Segfault using Discord.JS and ts3-nodejs-library HOT 2
- Using request.formData() when uploading a large file in a SvelteKit form action crashes Bun
- BUN_CONFIG_NO_CLEAR_TERMINAL_ON_RELOAD doesn't work
- `bun i -g` crashes on Windows when used on a path containing non-ASCII characters
- [ERROR] TTY initialization failed: uv_tty_init returned EINVAL
- crashed in windows when using 'Bun create' HOT 2
- 2 step plan to fix most DNS-related issues in Bun HOT 1
- syscall error on windows system HOT 1
- Re-enable jsxs feature flag
- Can't run bunx @inlang/paraglide-next init HOT 1
- Elysia and bun crush when use in wndows
- Error creating a Bun + Svelte app
- Bun Crash Report
- bunx codemon
- Cross-compile crash when building Linux executable on Windows
- Bun Crashing for some reason
- ENOENT: Bun could not find a file, and the code that produces this error is missing a better error.
- Cannot create react project
- A build option to disable converting non-Latin characters to Unicode codes
- Allow using wss:// in `debug.bun.sh` links
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bun.