You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I just signed up for Builder, I’m on the “Welcome to Builder” screen, using “Integrate your existing project”.
I get an error when starting dev server - Error: Invalid path: C:\dev\project\code\package.json (7341) - when executing npm run dev on Windows.
Describe the bug
I created a new Qwik site using Cloudflare Pages integration following Deploy a Qwik site · Cloudflare Pages docs.
Then, I signed up at builder.io, and got to the “Welcome to Builder” screen, which said to run npm init builder.io@latest --existing to “Integrate your existing project”.
After that, I ran npm install and npm run dev, but it errors out right away with the following:
> dev
> vite --mode ssr
error when starting dev server:
Error: Invalid path: C:\dev\project\code\package.json (7341)
at m (file:///C:/dev/project/code/node_modules/@builder.io/dev-tools/node/index.mjs:1:2907)
at Object.readFile (file:///C:/dev/project/code/node_modules/@builder.io/dev-tools/node/index.mjs:1:1629)
at f (file:///C:/dev/project/code/node_modules/@builder.io/dev-tools/node/index.mjs:1:466)
at u (file:///C:/dev/project/code/node_modules/@builder.io/dev-tools/node/index.mjs:1:583)
at $ (file:///C:/dev/project/code/node_modules/@builder.io/dev-tools/node/index.mjs:1:2704)
at configureServer (file:///C:/dev/project/code/node_modules/@builder.io/dev-tools/vite/index.mjs:3:293)
at _createServer (file:///C:/dev/project/code/node_modules/vite/dist/node/chunks/dep-jDlpJiMN.js:64550:30)
at async CAC.<anonymous> (file:///C:/dev/project/code/node_modules/vite/dist/node/cli.js:762:24)
To Reproduce
Steps to reproduce the behavior on Windows:
Edit your /node_modules/@builder.io/dev-tools/vite/index.mjs file on line 3, character 293
// add .replaceAll("/", "\\") to t.config.rootasyncconfigureServer(t){letn=await$({getRootDir:()=>t.config.root.replaceAll("/","\\")})
Solution 2:
A bit more typing
Edit your /node_modules/@builder.io/dev-tools/vite/index.mjs file
// import join from path at beginning of fileimport{join}from'path';//... rest of file// search for and edit -> configureServer(t)asyncconfigureServer(t){letn=await$({getRootDir:()=>join(t.config.root)})//... rest of file
Hi, I just signed up for Builder, I’m on the “Welcome to Builder” screen, using “Integrate your existing project”.
I get an error when starting dev server -
Error: Invalid path: C:\dev\project\code\package.json (7341)
- when executingnpm run dev
on Windows.Describe the bug
I created a new Qwik site using Cloudflare Pages integration following Deploy a Qwik site · Cloudflare Pages docs.
Then, I signed up at builder.io, and got to the “Welcome to Builder” screen, which said to run
npm init builder.io@latest --existing
to “Integrate your existing project”.After that, I ran
npm install
andnpm run dev
, but it errors out right away with the following:To Reproduce
Steps to reproduce the behavior on Windows:
npm create cloudflare@latest my-qwik-app -- --framework=qwik
npm init builder.io@latest --existing
npm install
npm run dev
Expected behavior
Qwik dev server working locally on a Windows machine after integrating Builder.
Additional context
These are the dependencies added:
And it fails here:
Debugging values:
The issue seems to stem from a non-normalized path separator.
Could anyone please help fix this?
The text was updated successfully, but these errors were encountered: