Nuxt SyntaxError: Unexpected token 'export' - nuxtjs 2.15.0 - tailwindcss
See original GitHub issueHi, I upgraded nuxt from 2.14.12 to 2.15.0, When Iโm running in development mode with npm run dev
command, Error happens!
When I remove '@nuxtjs/tailwindcss'
, Error not happens.
Nuxt.config.js:
buildModules: [
'@nuxtjs/tailwindcss',
],
Error:
ฮป npm run dev
> client@0.45.5 dev D:\projects\iranuiux.ir\client
> nuxt
FATAL Unexpected token 'export' 23:24:42
(function (exports, require, module, __filename, __dirname) { export default {
^^^^^^
SyntaxError: Unexpected token 'export'
at new Script (vm.js:101:7)
at p._moduleCompile (node_modules\jiti\dist\v8cache.js:2:3046)
at Module.o._compile (node_modules\jiti\dist\v8cache.js:2:2597)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at n (node_modules\jiti\dist\v8cache.js:2:2364)
at ModuleContainer.module.exports (node_modules\@nuxtjs\tailwindcss\lib\module.js:36:22)
at async ModuleContainer.addModule (node_modules\@nuxt\core\dist\core.js:239:20)
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ โ Nuxt Fatal Error โ
โ โ
โ SyntaxError: Unexpected token 'export' โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@0.45.5 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client@0.45.5 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Everything works awesome in nuxt 2.14.12, in nuxt 2.15.0 this error happens.
Dependencies
"dependencies": {
"@nuxtjs/axios": "^5.13.1",
"@nuxtjs/google-analytics": "^2.4.0",
"@nuxtjs/recaptcha": "^1.0.1",
"core-js": "^3.9.0",
"csrf": "^3.1.0",
"jalali-moment": "^3.3.9",
"lodash": "^4.17.20",
"nuxt": "^2.15.0",
"nuxt-buefy": "^0.4.4",
"sass": "^1.32.7",
"sass-loader": "^10.1.0",
"v-clipboard": "^2.2.3",
"vee-validate": "^3.4.5"
},
"devDependencies": {
"@nuxt/types": "^2.15.0",
"@nuxtjs/tailwindcss": "^3.4.2",
"@vue/test-utils": "^1.1.3",
"autoprefixer": "^9.8.6",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^26.5.0",
"eslint": "^7.20.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-vue": "^7.6.0",
"jest": "^26.5.0",
"postcss": "^7.0.35",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.3",
"vue": "^2.6.12",
"vue-jest": "^3.0.4"
}
Versions
- nuxt: 2.15.0
- node: 14.15.4
- @nuxtjs/tailwindcss: 3.4.2
- tailwindcss: โnpm:@tailwindcss/postcss7-compat@^2.0.3โ
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10
Top Results From Across the Web
Nuxt SyntaxError: Unexpected token 'export' - nuxtjs 2.15.0
Hi, I upgraded nuxt from 2.14.12 to 2.15.0, When I'm running in development mode with npm run dev command, Error happens!
Read more >nuxt error "Uncaught SyntaxError: Unexpected token '<'" when ...
I finally found a solution, it's actually the rewrite rules in the vhost that don't work properly. By creating a .htaccess directly at...
Read more >How to fix Nuxt.js unexpected token export error - YouTube
Setting up Nuxt.js is a pretty straightforward process but I hit at least one snag. Here's how I got around an issue I...
Read more >Angular2 Final Release - "Error: Angular requires Zone.js ...
Issue. I have upgraded from RC4 to the Final release of Angular2. When I run npm start , the app is stuck on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
FATAL Unexpected token โexportโ 16:06:26
(function (exports, require, module, __filename, __dirname) { export const future = { ^^^^^^
SyntaxError: Unexpected token โexportโ at new Script (node:vm:101:7) at p._moduleCompile (node_modules/jiti/dist/v8cache.js:2:3154) at Module.o._compile (node_modules/jiti/dist/v8cache.js:2:2705) at Object.Module._extensionsโฆjs (node:internal/modules/cjs/loader:1137:10) at Module.load (node:internal/modules/cjs/loader:973:32) at Function.Module._load (node:internal/modules/cjs/loader:813:14) at Module.require (node:internal/modules/cjs/loader:997:19) at n (node_modules/jiti/dist/v8cache.js:2:2472) at ModuleContainer.module.exports (node_modules/@nuxtjs/tailwindcss/lib/module.js:33:22) at async ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:239:20)
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ โ โ โ Nuxt Fatal Error โ โ โ โ SyntaxError: Unexpected token โexportโ โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Any idea of this error?