Closed chz closed 3 years ago
/cc @danielroe
@chz Would you provide a reproduction, please? 🙏
@danielroe Check sandbox : https://codesandbox.io/s/hidden-grass-mpmd8 see console. For detail.
Same problem.
Linux
v14.18.1
2.16.0-27226092.034b9901
Yarn
Webpack
version
, bridge
, head
, smartlook
, pwa
, plugins
, telemetry
, components
, loading
, tailwindcss
, render
, buildModules
, modules
, googleAnalytics
, vueMeta
, cache
, sitemap
, redirect
, auth
, axios
, privateRuntimeConfig
, publicRuntimeConfig
, storybook
, i18n
, build
@nuxtjs/router@1.6.1
, nuxt-ssr-cache@1.5.2
, @nuxtjs/axios@5.13.6
, @nuxtjs/auth-next@5.0.0-1618502945.2770f1f
, @nuxt/image@0.0.4
, nuxt-i18n@6.28.1
, @nuxtjs/sitemap@2.4.0
, @nuxtjs/component-cache@1.1.6
, @nuxtjs/style-resources@1.2.1
, nuxt-smartlook@0.0.1
, @nuxtjs/google-adsense@1.4.0
@nuxtjs/tailwindcss@4.2.1
, @nuxtjs/fontawesome@1.1.2
, @nuxtjs/dotenv@1.4.1
, @nuxtjs/pwa@3.3.5
, @nuxtjs/google-analytics@2.4.0
, @nuxt/bridge@3.0.0-27234503.d5127e9
Can confirm that I'm receiving the same issue using ...mapState
+1
+1
Getting the same issue when using the auth module which uses vuex as well. https://codesandbox.io/s/nuxt3-pwufw?file=/nuxt.config.js
In console log you see:
TypeError: _typeof is not a function
Is Vuex already implemented in nuxt3?
+1
can't commit,show error message: _typeof is not a function
+1
+1
The issues you've been experiencing with vuex
should be resolved with nuxt/framework#1026, but leaving issue open to track root cause.
As a hint, I've experienced the same issue when trying to import .vue
components that has already been built in a @nuxt/bridge project.
Fixed it by not building components and exporting them from my package as a raw .vue.
Having an issue with a package this time https://www.npmjs.com/package/vue-product-zoom
client.js?06a0:103 TypeError: _typeof is not a function
at eval (app.bundle.js?6e0e:1)
at Object.eval (app.bundle.js?6e0e:1)
at eval (app.bundle.js:1495)
at Object../node_modules/vue-product-zoom/dist/assets/js/app.bundle.js (0.js:10)
at __webpack_require__ (runtime.js:854)
at fn (runtime.js:151)
at eval (vue-product-zoom.js?5693:1)
at Module../plugins/vue-product-zoom.js (1.js:11)
at __webpack_require__ (runtime.js:854)
at fn (runtime.js:151)
@danielroe
After applying fix(bridge): add vuex alias nuxt/framework#1026
Have another one with a package vueescroll and the most of 3rd party plugins.
vuescroll.js?77a0:10 Uncaught TypeError: _typeof2 is not a function
at eval (vuescroll.js?77a0:10)
at eval (vuescroll.js?77a0:13)
at Object../node_modules/vuescroll/dist/vuescroll.js (app.js:2316)
at __webpack_require__ (runtime.js:859)
at fn (runtime.js:151)
at eval (vuescroll.js?b443:1)
at Module../plugins/vuescroll.js (app.js:2028)
at __webpack_require__ (runtime.js:859)
at fn (runtime.js:151)
at eval (index.js:61)
I had the same error. The reason was the transpilation settings I used before.
Fixed the problem by removing @nuxt/babel-preset-app
from presets
section in babel.config.js
(or in nuxt.config.js/babel
). To make the specific features that I need work, I just installed the appropriate plugins. For example, @babel/plugin-proposal-optional-chaining
and @babel/plugin-proposal-private-methods
.
@danielroe , @pi0 is this merged and updated in npm ? Because im getting error
Uncaught TypeError: _typeof is not a function at isObject (vuex.common.js:155) at isValidMap (vuex.common.js:1223) at eval (vuex.common.js:1103) at eval (vuex.common.js:1241) at eval (transform.js?!./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/unplugin/dist/webpack/loaders/transform.js?!./node_modules/unplugin/dist/webpack/loaders/transform.js?!./components/Header/HeaderUser/LoggedIn.vue?vue&type=script&lang=js&:86) at Module../node_modules/unplugin/dist/webpack/loaders/transform.js?!./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/unplugin/dist/webpack/loaders/transform.js?!./node_modules/unplugin/dist/webpack/loaders/transform.js?!./components/Header/HeaderUser/LoggedIn.vue?vue&type=script&lang=js& (app.js:5845) at __webpack_require__ (runtime.js:854) at fn (runtime.js:151) at eval (LoggedIn.vue?vue&type=script&lang=js&:3) at Module../components/Header/HeaderUser/LoggedIn.vue?vue&type=script&lang=js& (app.js:1073)
I'm testing latest version (3.0.0-27242539.adf4970
), but still having same error.
I'm tested also with newest version (Version: 3.0.0-27242646.117b3aa), but same error
Environment
Development, Local
Darwin
v14.18.0
2.16.0-27226092.034b9901
Yarn
Webpack
head
,loading
,router
,css
,styleResources
,plugins
,components
,buildModules
,prismic
,googleFonts
,pwa
,build
,server
-
Build Modules:
@nuxtjs/prismic@1.3.1
,@nuxtjs/pwa@3.3.5
,@nuxtjs/style-resources@1.2.1
,@nuxtjs/eslint-module@3.0.2
,@nuxtjs/google-fonts@1.3.0
,@nuxt/bridge@3.0.0-27234503.d5127e9
Describe the bug and expected behavior
Actual: Vuex helper functions broken when using @nuxt/bridge Expected: Must work as before.
Steps to reproduce
computed:{ ...mapGetters({ sidebarOpened: 'sidebarOpened' }) }
Additional context