Skip to content

error when starting dev server #394

Open
@burns-brian

Description

@burns-brian

Describe the bug

When running magidoc dev for any project, including the default spacex example, the following error occurs: Error: ENOENT: no such file or directory, realpath '/private/var/folders/cx/0lwng48n405dwjlp4694b5bc0000gn/T/[email protected]/localhost'. The log says Server listening on http://localhost:3000, but browsers result in a "can't connect to server" error.

Reproduction

Download a copy of magidoc at v6.0.0. Although, I have also experienced this in v4.2.1. Navigate to the spacex example (i.e. cd ~/Downloads/magidoc-main/packages/examples/spacex. Then, run npm i -g @magidoc/[email protected]. Finally, run magidoc dev.

Logs

magidoc dev
✔ Determine tmp directories [0.0s]
✔ Select Package Manager [3s]
↓ Template already unzipped.
↓ Template already unzipped
✔ Install dependencies [0.7s]
✔ Resolving template configuration [0.0s]
✔ Load GraphQL Schema [0.4s]
✔ Copy static assets [0.0s]
✔ Write variables file [0.0s]
Command 'npm' failed with status 1 when executed in directory /var/folders/cx/0lwng48n405dwjlp4694b5bc0000gn/T/[email protected]

---- Program Output----

> @magidoc/[email protected] dev
> vite dev localhost 3000

error when starting dev server:
Error: ENOENT: no such file or directory, realpath '/private/var/folders/cx/0lwng48n405dwjlp4694b5bc0000gn/T/[email protected]/localhost'
    at realpathSync.native (node:fs:2776:18)
    at getRealPath (file:///private/var/folders/cx/0lwng48n405dwjlp4694b5bc0000gn/T/[email protected]/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:46384:16)
    at getFsUtils (file:///private/var/folders/cx/0lwng48n405dwjlp4694b5bc0000gn/T/[email protected]/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:46129:68)
    at preAliasPlugin (file:///private/var/folders/cx/0lwng48n405dwjlp4694b5bc0000gn/T/[email protected]/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:48406:19)
    at resolvePlugins (file:///private/var/folders/cx/0lwng48n405dwjlp4694b5bc0000gn/T/[email protected]/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:49101:5)
    at resolveConfig (file:///private/var/folders/cx/0lwng48n405dwjlp4694b5bc0000gn/T/[email protected]/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:66619:28)
    at async _createServer (file:///private/var/folders/cx/0lwng48n405dwjlp4694b5bc0000gn/T/[email protected]/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:62977:18)
    at async CAC.<anonymous> (file:///private/var/folders/cx/0lwng48n405dwjlp4694b5bc0000gn/T/[email protected]/node_modules/vite/dist/node/cli.js:735:20)


For a more detailed output, run with --stacktrace

-----------

Server listening on http://localhost:3000

System Info

System:
    OS: macOS 14.5
    CPU: (20) arm64 Apple M1 Ultra
    Memory: 1.50 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.4.0 - /opt/homebrew/bin/node
    npm: 10.2.4 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 127.0.6533.74
    Edge: 127.0.2651.74
    Safari: 17.5

Severity

Serious, but I can work around it

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions