Templarian / MaterialDesign-JS

Dist for Material Design Icons JS/TypeScript
Other
161 stars 18 forks source link

Uncaught ReferenceError: mdiAccount is not defined at <anonymous>:1:13 #5

Closed bojowa closed 4 years ago

bojowa commented 4 years ago

npm install @mdi/js has already install, this is src/main.js import { mdiAccount } from '@mdi/js' do console.log(mdiAccount),it showns that. why this?

St-Ex commented 4 years ago

You are not providing much information there. What kind of project are you using ? What builder ? Transpiler ? Have you tried to delete your node_modules and re run an installation ?

npm install
# or
yarn

I'm on a @vue/cli project with webpack4 typescript and it works perfectly

// [...]
import { mdiAccount } from '@mdi/js'
// [...]
console.log(mdiAccount)
// [...]

Shows in console

M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z
Templarian commented 4 years ago

Closing this out as this is most likely related to an incorrectly configured project as explained above.

Thanks @St-Ex! 👍