2017-11-14 16 views
0

私は活字体でReact.jsを使用していると私は、このエラーを抱えている:React.js typescriptですがsweetalertエラー

node_modules\@types\sweetalert\index.d.ts 
error TS2451: Cannot redeclare block-scoped variable 'sweetAlert'. 

依存関係:

"dependencies": { 
    "react": "^16.1.0", 
    "react-dom": "^16.1.0", 
    "react-router-dom": "^4.2.2", 
    "react-scripts-ts": "2.8.0", 
    "sweetalert": "^2.0.8" 
    }, 
    "devDependencies": { 
    "@types/jest": "^21.1.6", 
    "@types/node": "^8.0.51", 
    "@types/react": "^16.0.22", 
    "@types/react-dom": "^16.0.3", 
    "@types/react-router-dom": "^4.2.1", 
    "@types/sweetalert": "^1.1.28" 
    } 

答えて

0

Cannot redeclare block-scoped variable 'sweetAlert'.

sweetAlertは活字体で書かれていますもう@types/sweetAlertは必要ありません。

修正

npm uninstall @types/sweetAlert 

利益

関連する問題