ionic-team/starters

bug: SyntaxError: The requested module 'vue' does not provide an export named 'computed'

dburucu opened this issue · 2 comments

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

ionic start test3 blank --type vue
npm i
ionic serve

produces error:

> vite.cmd --host=localhost --port=8100
[vite] failed to load config from D:\www\ionic\ionic-vue-app\vite.config.ts
[vite] error when starting dev server:
[vite] file:///D:/www/ionic/ionic-vue-app/node_modules/@vitejs/plugin-vue/dist/index.mjs:3
[vite] import { shallowRef, computed } from 'vue';
[vite]                      ^^^^^^^^
[vite] SyntaxError: The requested module 'vue' does not provide an export named 'computed'
[vite]     at ModuleJob._instantiate (node:internal/modules/esm/module_job:121:21)
[vite]     at async ModuleJob.run (node:internal/modules/esm/module_job:171:5)
[vite]     at async Loader.import (node:internal/modules/esm/loader:178:24)
[vite]     at async loadConfigFromBundledFile (file:///D:/www/ionic/ionic-vue-app/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:66309:21)
[vite]     at async loadConfigFromFile (file:///D:/www/ionic/ionic-vue-app/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:66158:28)
[vite]     at async resolveConfig (file:///D:/www/ionic/ionic-vue-app/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:65754:28)
[vite]     at async _createServer (file:///D:/www/ionic/ionic-vue-app/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:65031:20)
[vite]     at async CAC.<anonymous> (file:///D:/www/ionic/ionic-vue-app/node_modules/vite/dist/node/cli.js:763:24)


Expected Behavior

starting server

Steps to Reproduce

ionic start test3 blank --type vue
npm i
ionic serve

Code Reproduction URL

No response

Ionic Info

[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package.json'

   Require stack:
   - C:\Program Files (x86)\Nodist\bin\node_modules\@ionic\cli\lib\project\index.js
   - C:\Program Files (x86)\Nodist\bin\node_modules\@ionic\cli\lib\index.js
   - C:\Program Files (x86)\Nodist\bin\node_modules\@ionic\cli\index.js
   - C:\Program Files (x86)\Nodist\bin\node_modules\@ionic\cli\bin\ionic

[WARN] Error loading @capacitor/android package.json: Error: Cannot find module '@capacitor/android/package.json'

   Require stack:
   - C:\Program Files (x86)\Nodist\bin\node_modules\@ionic\cli\lib\project\index.js
   - C:\Program Files (x86)\Nodist\bin\node_modules\@ionic\cli\lib\index.js
   - C:\Program Files (x86)\Nodist\bin\node_modules\@ionic\cli\index.js
   - C:\Program Files (x86)\Nodist\bin\node_modules\@ionic\cli\bin\ionic

Ionic:

Ionic CLI : 7.1.1 (C:\Program Files (x86)\Nodist\bin\node_modules@ionic\cli)
Ionic Framework : @ionic/vue 7.4.3

Capacitor:

Capacitor CLI : 5.2.1
@capacitor/android : not installed
@capacitor/core : 5.2.1
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 1.7.3

System:

NodeJS : v16.0.0 (C:\Program Files (x86)\Nodist\v-x64\16.0.0\node.exe)
npm : 6.14.16
OS : Windows 10

Additional Information

No response

Hey there,

I'm not able to reproduce that error on my end. However, I will note that the error is coming from @vitejs/plugin-vue which is not something Ionic maintains. I'd check to make sure you are running the latest version of Vue.

Hey there,

I have not heard back so I am going to close this. If you are still running into this error please open a new issue. Thanks!