Skip to content

Conversation

@swarfte
Copy link

@swarfte swarfte commented May 14, 2024

When I try to use npm install to setup the project, I encounter the following problem.
before

Therefore, I find the solution from stackoverflow, I add the alias for pinia in nuxt.config.ts

So now it can run successfully.
after

@codesandbox
Copy link

codesandbox bot commented May 14, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@lianginx lianginx self-requested a review May 15, 2024 02:46
@lianginx
Copy link
Owner

Thank you for the inspiration your solution provided. I tried a more general solution and resolved the issue.

// package.json
{
  "dependencies": {
    // ...
    "pinia": "^2.1.7"
  },
  "peerDependencies": {
    "vue": "^3.4.27"
  }
}

You can test this solution and update your PR (Pull Request), and I will merge it into the main repository so that your avatar will be displayed for contributors.

My English is not good, this response was generated using AI translation.

@lianginx
Copy link
Owner

Thank you for the inspiration your solution provided. I tried a more general solution and resolved the issue.

// package.json
{
  "dependencies": {
    // ...
    "pinia": "^2.1.7"
  },
  "peerDependencies": {
    "vue": "^3.4.27"
  }
}

You can test this solution and update your PR (Pull Request), and I will merge it into the main repository so that your avatar will be displayed for contributors.

My English is not good, this response was generated using AI translation.

I'm sorry, there is an issue with this method; it will cause an error when running npm run dev.

@swarfte
Copy link
Author

swarfte commented May 18, 2024

BTW, I also found some issue when I try to run "npm run dev" , it show that missing some package from @nuxtjs/i18n, I found that it is an syntax errors
before

so I fix it and run again,
solution

but after I open the localhost:3000, then I see another error
error

@tjuzyp
Copy link

tjuzyp commented May 16, 2025

"peerDependencies": {
    "vue": "^3.4.27"
  }

在我这里,它是工作的,但存在新的问题:
Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.cache/vite/client/deps/cookie-es.js?v=f9cdb841' does not provide an export named 'parseSetCookie' (at index.mjs?v=e5593934:2:39)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants