nuxt: [SSR] Error transforming app.vue: Cannot read properties of undefined (reading 'uid')
I’ve been getting strange warnings tonight on fresh Nuxt3 projects, both on OSX and Linux. The warnings look like the following:
WARN [SSR] Error transforming .../testing/app.vue: Cannot read properties of undefined (reading 'uid')
at Object.statSync (node_modules/graceful-fs/polyfills.js:313:17)
at isDirectory (node_modules/resolve/lib/sync.js:22:23)
at loadNodeModulesSync (node_modules/resolve/lib/sync.js:191:17)
at Function.resolveSync [as sync] (node_modules/resolve/lib/sync.js:98:17)
at resolveFrom$3 (node_modules/vite/dist/node/chunks/dep-76613303.js:3911:29)
at resolvePackageData (node_modules/vite/dist/node/chunks/dep-76613303.js:30046:19)
at node_modules/vite/dist/node/chunks/dep-76613303.js:30426:15
at Array.find (<anonymous>)
at tryNodeResolve (node_modules/vite/dist/node/chunks/dep-76613303.js:30425:44)
at Context.resolveId (node_modules/vite/dist/node/chunks/dep-76613303.js:30257:28)
Running npx nuxi info gives the following:
- Operating System: `Darwin`
- Node Version: `v17.0.1`
- Nuxt Version: `3.0.0-27338323.1e98259`
- Package Manager: `yarn@1.22.17`
- Bundler: `Vite`
- User Config: `-`
- Runtime Modules: `-`
- Build Modules: `-`
I get the same error on Linux with Node v14.
Any ideas ?!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 28 (6 by maintainers)
For now, you can work around this by adding a resolution for resolve in your
package.json:For npm, just add
resolve: 1.20.0to yourdevDependencies(notoverrides)Remove it after
isaacs/node-graceful-fsmerges their (impossible for reason) PR.@lewebsimple Yea, not without a silly remark from isaacs though.
I have still the same problem with the playground of Nuxt3 modules.
This doesn’t work for me.
@SunMar
resolutionsonly works for yarn. For npm v8, you can replaceresolutionswithoverrides.@danielroe what other steps are needed to make this workaround work? I am working with a brand new initialized nuxt 3 project, updated my
package.jsonfile and tried runningnpm update,npm install, removingpackage-lock.json. but I’m still experiencing the error.Cool… It works fine…
For NPM v8.x in package.json
{ "devDependencies": { "nuxt3": "latest", "resolve": "1.20.0" } }Same problem here
This works for me, after amending my “nuxt3” to “latest” and adding the “resolutions”: { “resolve”: “1.20.0” }, I ran
yarn installagain and it’s working.Works only with YARN manager - for NPM doesn’t…
It’s work for me! Thank you 😃
i think it’s a dependecy bug … so you can copy SB Starter Package-lock.json and then try
npm installoryarn installmake sure your npm or yarn is the latest version. hope it works ❤️ ( this problem need an update to solve but this solution can help you … just to clarify )