question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pinia error on RC8 build

See original GitHub issue

Environment

Nuxt project info: 02:11:39


  • Operating System: Windows_NT
  • Node Version: v16.15.1
  • Nuxt Version: 3.0.0-rc.8
  • Package Manager: npm@8.13.2
  • Builder: vite
  • User Config: modules, nitro, buildModules, css
  • Runtime Modules: @nuxtjs/tailwindcss@5.3.2
  • Build Modules: @pinia/nuxt@0.3.1

Reproduction

When i am trying to build (npm run build) :

npm run build

build nuxt build

Nuxt CLI v3.0.0-rc.8 02:12:47 i Using Tailwind CSS from ~/assets/css/tailwind.css nuxt:tailwindcss 02:12:56 i Client built in 3678ms 02:13:02 i Building server… 02:13:02 √ Server built in 1608ms 02:13:03 √ Generated public .output/public nitro 02:13:03 start Building server… nitro 02:13:04

ERROR Rollup error: Could not load C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs (imported by .nuxt/dist/server/server.mjs): ENOENT: no such file or directory, open ‘C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs’

ERROR Could not load C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs (imported by .nuxt/dist/server/server.mjs): ENOENT: no such file or directory, open ‘C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs’

Describe the bug

When i am trying to run this npm run build . On my machine or on vercel. I receive the same errors.

npm run build

ERROR Rollup error: Could not load C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs (imported by .nuxt/dist/server/server.mjs): ENOENT: no such file or directory, open ‘C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs’

ERROR Could not load C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs (imported by .nuxt/dist/server/server.mjs): ENOENT: no such file or directory, open ‘C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs’

Additional context

package json:

{ “private”: true, “scripts”: { “build”: “nuxt build”, “dev”: “nuxt dev”, “generate”: “nuxt generate”, “preview”: “nuxt preview” }, “dependencies”: { “@nuxtjs/axios”: “^5.13.6”, “@nuxtjs/tailwindcss”: “^5.1.2”, “@pinia/nuxt”: “^0.3.0”, “axios”: “^0.27.2”, “nuxt”: “^3.0.0-rc.6” } }

Logs

npm run build

> build
> nuxt build

Nuxt CLI v3.0.0-rc.8                                                                                                                                                                                   02:12:47
i Using Tailwind CSS from ~/assets/css/tailwind.css                                                                                                                                   nuxt:tailwindcss 02:12:56
i Client built in 3678ms                                                                                                                                                                               02:13:02
i Building server...                                                                                                                                                                                   02:13:02
√ Server built in 1608ms                                                                                                                                                                               02:13:03
√ Generated public .output/public                                                                                                                                                                nitro 02:13:03
start Building server...                                                                                                                                                                         nitro 02:13:04


 ERROR  Rollup error: Could not load C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs (imported by .nuxt/dist/server/server.mjs): ENOENT: no such file or directory, open 'C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs'


 ERROR  Could not load C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs (imported by .nuxt/dist/server/server.mjs): ENOENT: no such file or directory, open 'C:\Users\husen\code\FuracaoDublin2\node_modules\pinia\dist\pinia.mjs\dist\pinia.mjs'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pi0commented, Sep 4, 2022

@caio-emidio I hope your issue is solved but if didn’t don’t hesitate to DM me ib discord.

1reaction
MorevMcommented, Sep 3, 2022

@caio-emidio you need to install pinia itself alongside the @pinia/nuxt 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

nuxt-bridge-pinia-error - CodeSandbox
serve with hot reload at localhost:3000. $ yarn dev. # build for production and launch server. $ yarn build. $ yarn start. #...
Read more >
Why are my Pinia store getters undefined? - Stack Overflow
Turns out the current @next -version (2.0.0-rc8) has broken getters in stores. https://github.com/posva/pinia/issues/660.
Read more >
Using a store outside of a component - Pinia
The easiest way to ensure this is always applied is to defer calls of useStore() by placing them inside functions that will always...
Read more >
[nuxt] [request error] require is not defined in es module scope ...
Im trying to unse lighGallery inside a Vue Component with Nuxt 3 rc8 ... After the build.transpile is added, there is a problem...
Read more >
Pinia vs. Vuex: Which state management library is best for Vue?
js project so that you can use Pinia's global object in your code. To create a store, you call the defineStore method with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found