-
-
Notifications
You must be signed in to change notification settings - Fork 94
The "path" argument must be of type string. Received undefined on initial start from Template › One + Zero #496
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
Comments
Also getting this error with the latest one |
Can you verify if it works with other package managers? |
Hey, I just tried with bun and getting the same issue as with npm
|
@natew I added a temporary fix to get it running. This solved it: /node_modules/@vxrn/compiler/dist/esm/index.mjs Added: import { fileURLToPath } from "node:url";
import { extname, join, sep, dirname } from "node:path"; and line 46, changed to: load: id => id === runtimePublicPath ? readFileSync(join(dirname(fileURLToPath(import.meta.url)), "refresh-runtime.js"), "utf-8") : void 0 Im not sure if its the best way to fix it, but it works now. seems import.meta.dirname was causing the issue |
TipIt appears that I have successfully resolved the issue. Below is the solution in both English and Chinese versions (Chinese version is the authoritative one). I have used an LLM to complete the English writing and the bilingual Markdown formatting. Please refer to the Chinese version as the definitive source. Chinese version for this tip:我似乎成功解决了这个问题,以下是解决方案的双语版本(中文版本为准)。我的英语水平有限,因此使用了llm完成了英文部分的撰写以及中英文的 Markdown 排版。希望这对您有帮助。中文版本将附在文末。 Solution for "path" argument error in Issue #496I encountered the same "path" argument must be of type string. Received undefined error when using both nvm + npm and nvm + yarn combinations. Downgrading React from v19 to v18 and using Steps to Fix:
After following these steps, the error was resolved. My Chinese version我在使用 nvm + npm 和 nvm + yarn 组合时遇到了相同的 "path" argument must be of type string. Received undefined 错误。尝试将 React 从 v19 降级到 v18 并使用 解决步骤:
我的 {
"name": "one-app",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "one dev",
"build": "one build",
"serve": "one serve"
},
"dependencies": {
"one": "latest",
"peerjs": "^1.5.4",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "^0.76.5",
"react-native-web": "^0.19.12"
},
"devDependencies": {
"vite": "^6"
},
"volta": {
"node": "20.19.0",
"yarn": "4.8.1"
}
} |
By the way, I locked the versions of react and react-dom in package.json. One reason is that I wanted to downgrade from react 19 (as provided in the official Get Started guide) to react 18. The other reason is that I encountered an Chinese version顺带一提,我在package.json中锁定了react和react-dom版本,其一是因为我想从官方Get Start的react19降级到react18,其二是因为我在nvm+npm时遇到了react和react-dom版本不匹配的npm install报错(请原谅我无法提供当时的日志),因此手动指定了它们的版本并执行了npm install --force以绕过react和react-native版本不匹配的报错(似乎One Stack在他们的Feature介绍中提到了他们有进行这一适配工作,但结论是warning仍然出现。不知是否是我理解问题,如果有哪位可以向我简单解释一下就再好不过了) |
For the "adaptation of the mismatch between react and react-native" I've mentioned, I found it [here】(https://onestack.dev/docs/features
|
For more info: |
@zetavg seems a simple fix we can land |
Current Behavior
npx one
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
Hello. Let's create a new ① app...
✔ Name … someapp
✔ Template › One + Zero
pnpm package manager
Navigate to start page and receive the following error
Expected Behavior
Expect to see the base template app
One Version
Platform (Web, iOS, Android)
Reproduction
System Info
The text was updated successfully, but these errors were encountered: