I've been working on a website using nuxt.js and the trading-vue-js plugins, similar to Tradingview.com.
After installing the trading-vue-js plugins in my project and attempting to write the code, I encountered an error in the 'trading-vue-js' import section. The error message is as follows:
[error message] Could not find a declaration file for module 'trading-vue-js'. 'c:/Users/naoyuki/nuxt-website-project/website-project/node_modules/trading-vue-js/dist/trading-vue.js' implicitly has an 'any' type. Try
npm install @types/trading-vue-js
if it exists or add a new declaration (.d.ts) file containing `declare module 'trading-vue-js';
Due to my limited English proficiency, I attempted to insert the following code
plugins :[{sorce:'~/plugins/trading-vue-js'}]
into nuxt.config.js. However, the issue persisted. Can anyone offer some guidance? Here is the code I am using:
<template>
<trading-vue :data="this.$data"></trading-vue>
</template>
<script lang="ts">
import {Component,Vue} from 'nuxt-property-decorator'
import TradingVue from 'trading-vue-js'
@Component({components:{TradingVue}})
export default class extends Vue{
data() {
return {
ohlcv: [
[ 1551128400000, 33, 37.1, 14, 14, 196 ],
[ 1551132000000, 13.7, 30, 6.6, 30, 206 ],
[ 1551135600000, 29.9, 33, 21.3, 21.8, 74 ],
[ 1551139200000, 21.7, 25.9, 18, 24, 140 ],
[ 1551142800000, 24.1, 24.1, 24, 24.1, 29 ],
]
}
}
}
</script>