chatgpt-nuxt icon indicating copy to clipboard operation
chatgpt-nuxt copied to clipboard

fix module issue when "npm install"

Open swarfte opened this issue 1 year ago • 5 comments

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

swarfte avatar May 14 '24 15:05 swarfte

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

codesandbox[bot] avatar May 14 '24 15:05 codesandbox[bot]

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 avatar May 15 '24 02:05 lianginx

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.

lianginx avatar May 15 '24 03:05 lianginx

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

swarfte avatar May 18 '24 16:05 swarfte