Adding code to main.js
dse102 opened this issue · 4 comments
I get this error when adding the code to main.js
Could not find a declaration file for module 'vue-google-adsense'. 'c:/vue_js/appname/node_modules/vue-google-adsense/dist/vuegoogleadsense.dist.js' implicitly has an 'any' type.
Try npm install @types/vue-google-adsense
if it exists or add a new declaration (.d.ts) file containing declare module 'vue-google-adsense';
[7016]
Can you try the latest version?
I also encountered the same problem
"vue": "^2.5.17"
"vue-google-adsense": "^1.4.2"
"vue-script2": "^2.0.3",
The browser of the browser reports an error#1:
H
message: "adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page."
name: "TagError"
stack: "TagError: adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page.↵ at Zh (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:1:70397)↵ at Yh (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:1:70127)↵ at ci (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:1:73246)↵ at b (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:1:73289)↵ at di (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:1:73493)↵ at ki (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:1:76925)↵ at fi (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:1:74697)↵ at https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:1:73860↵ at td (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:1:18054)↵ at Dd (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:1:20875)"
proto: Error
The browser of the browser reports an error#2:
ReferenceError:
React is not defined
at a.render (VueGoogleAdsense.cjs.min.js:1)
at a.t._render (vue.runtime.esm.js:4540)
at a.r (vue.runtime.esm.js:2784)
at sn.get (vue.runtime.esm.js:3138)
at new sn (vue.runtime.esm.js:3127)
at De (vue.runtime.esm.js:2791)
at a.sr.$mount (vue.runtime.esm.js:7995)
at init (vue.runtime.esm.js:4133)
at p (vue.runtime.esm.js:5604)
at h (vue.runtime.esm.js:5551)
Can you try update to 1.4.5
@158008001
Too strong! Thank you very much for creating it and sharing it!