Closed calcutinE closed 5 years ago
I am struggling with the same issue, couldn't find any fix. Thanks for raising this bug!
@chymz Yep. That fixes my issue. Many thanks Simon for your quick reply. Beers on me
Hate to revive a closed ticket...
Followed the same steps as OP.
node: v16.4.0
os: Windows 10
browser: Brave, Chrome
{
"name": "ssr",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"ssr:build": "vue-cli-service ssr:build",
"ssr:fix": "vue-cli-service ssr:fix",
"ssr:fix-vuex": "vue-cli-service ssr:fix-vuex",
"ssr:serve": "vue-cli-service ssr:serve",
"ssr:start": "vue-cli-service ssr:start",
"ssr:static": "vue-cli-service ssr:static"
},
"dependencies": {
"@uvue/core": "^0.1.0",
"@uvue/server": "^0.1.0",
"compression": "^1.7.3",
"connect": "^3.6.6",
"cookie-parser": "^1.4.3",
"core-js": "^3.6.5",
"register-service-worker": "^1.7.1",
"serve-static": "^1.13.2",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuetify": "^2.4.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@uvue/vue-cli-plugin-ssr": "~0.1.7",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-pwa": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^2.2.1",
"sass": "~1.32.0",
"sass-loader": "^10.0.0",
"vue-cli-plugin-vuetify": "~2.4.1",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.7.0"
}
}
module.exports = {
transpileDependencies: ["vuetify"],
};
[1627593656848] ERROR (11536 on DESKTOP-GTIJQ6E): Cannot use import statement outside a module
F:\ssr\node_modules\vuetify\lib\components\VApp\index.js:1
(function (exports, require, module, __filename, __dirname) { import VApp from './VApp';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at new Script (node:vm:100:7)
at createScript (node:vm:257:10)
at Object.runInThisContext (node:vm:305:10)
at wrapSafe (node:internal/modules/cjs/loader:1014:15)
at Module._compile (node:internal/modules/cjs/loader:1059:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:93:18)
at r (F:\ssr\node_modules\vue-server-renderer\build.dev.js:9348:16)
at eval (webpack:///external_%22vuetify/lib/components/VApp%22?:1:18)
at Object.vuetify/lib/components/VApp (server-bundle.js:652:1)
at __webpack_require__ (server-bundle.js:27:30)
at eval (webpack:///./src/App.vue?:7:85)
at Module../src/App.vue (server-bundle.js:429:1)
Describe the bug A clear and concise description of what the bug is.
To Reproduce
vue create srr
with Typescript featurevue add @uvue/ssr
vue add vuetify
Everything compiles in console, but once I navigate localhost it crashes
Expected behavior
uvue-cli
should work fine with vuetifyAdditional context
Please indicate versions of: