wrangler pages dev --no-bundle causing EPERM: operation not permitted, scandir
Getting EPERM issue on my mac, while running pages dev. Without the no-bundle option things work.
$ npx wrangler pages dev --no-bundle --compatibility-date=2023-05-18 -- npm run dev:cmd
Running npm run dev:cmd...
Sleeping 5 seconds to allow proxy process to start before attempting to automatically determine port...
To skip, specify the proxy port with --proxy.
[proxy]:
> [email protected] dev:cmd
> pnpm --filter "@finalytic/trpc-*" --filter "@finalytic/app-vrplatform" dev
[proxy]: Scope: 14 of 37 workspace projects
[proxy]: apps/vrplatform dev$ PORT=4019 NODE_ENV=development VITE_PLATFORM_NAME=vrplatform vite
Automatically determined the proxy port to be 4019.
Compiling worker to "/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/functionsWorker-0.6882236361528793.mjs"...
ā² [WARNING] 2 warning(s) when compiling Worker.
wrangler dev now uses local mode by default, powered by š„ Miniflare and š· workerd.
/Users/bkniffler/.nvm/versions/node/v18.6.0/lib/node_modules/wrangler/wrangler-dist/cli.js:30632
throw a;
^
[Error: EPERM: operation not permitted, scandir '/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/TemporaryItems'] {
errno: -1,
code: 'EPERM',
syscall: 'scandir',
path: '/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/TemporaryItems'
}
$ npx wrangler pages dev --no-bundle --compatibility-date=2023-05-18 -- npm run dev:cmd
Running npm run dev:cmd...
Sleeping 5 seconds to allow proxy process to start before attempting to automatically determine port...
To skip, specify the proxy port with --proxy.
[proxy]:
> [email protected] dev:cmd
> pnpm --filter "@finalytic/trpc-*" --filter "@finalytic/app-vrplatform" dev
[proxy]: Scope: 14 of 37 workspace projects
[proxy]: apps/vrplatform dev$ PORT=4019 NODE_ENV=development VITE_PLATFORM_NAME=vrplatform vite
Automatically determined the proxy port to be 4019.
Compiling worker to "/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/functionsWorker-0.6882236361528793.mjs"...
ā² [WARNING] 2 warning(s) when compiling Worker.
wrangler dev now uses local mode by default, powered by š„ Miniflare and š· workerd.
/Users/bkniffler/.nvm/versions/node/v18.6.0/lib/node_modules/wrangler/wrangler-dist/cli.js:30632
throw a;
^
[Error: EPERM: operation not permitted, scandir '/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/TemporaryItems'] {
errno: -1,
code: 'EPERM',
syscall: 'scandir',
path: '/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/TemporaryItems'
}
2 Replies
starting with sudo brings up another error
service core:user:worker: Uncaught Error: No such module "Users/bkniffler/.nvm/versions/node/v18.6.0/lib/node_modules/wrangler/templates/middleware/common.ts".
imported from "functionsWorker-0.9624656390655542.js"
ā [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
service core:user:worker: Uncaught Error: No such module "Users/bkniffler/.nvm/versions/node/v18.6.0/lib/node_modules/wrangler/templates/middleware/common.ts".
imported from "functionsWorker-0.9624656390655542.js"
ā [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
having the same issue :/ did you solve it somehow?