magic-regexp icon indicating copy to clipboard operation
magic-regexp copied to clipboard

No "exports" main defined in ....\.pnpm\[email protected]\node_modules\estree-walker\package.json

Open olemarius opened this issue 2 years ago • 3 comments

🐛 The bug

After running pnpm install and adding to vite.config.ts, I got the following error. I'm using vite 4 and pnpm

failed to load config from C:\Git\BlocPlatform\Bloc\Frontend\Bloc.Vue\vite.config.ts
error when starting dev server:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in C:\Git\BlocPlatform\Bloc\Frontend\Bloc.Vue\node_modules\.pnpm\[email protected]\node_modules\estree-walker\package.json
    at new NodeError (node:internal/errors:372:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:472:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:693:7)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Git\BlocPlatform\Bloc\Frontend\Bloc.Vue\node_modules\.pnpm\[email protected]\node_modules\magic-regexp\dist\transform.cjs:5:22)

 *  The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run dev" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

🛠️ To reproduce

n/a

🌈 Expected behaviour

Expected config to load.

ℹ️ Additional context

No response

olemarius avatar Feb 24 '23 07:02 olemarius

Same Issue.

ForeshadowRU avatar Feb 27 '23 09:02 ForeshadowRU

Any updates on this?

ForeshadowRU avatar Mar 13 '23 09:03 ForeshadowRU

Would you try renaming your vite.config file to vite.config.mjs?

danielroe avatar Mar 13 '23 16:03 danielroe