2017-02-24 247 views
1

我在安裝react-flux-starter-kit-windows時出錯。 我已經安裝了最新的Node.js和NPM 當我使用這個命令: NPM安裝-g反應磁通是初學者工具包 它給了我下面的錯誤'bash'不被識別爲內部或外部命令

[email protected] postinstall C:\Users\Hardik\AppData\Roaming\npm\node_modules\react-flux-starter-kit 
bash setup.sh 
'bash' is not recognized as an internal or external command, 
operable program or batch file. 
npm ERR! Windows_NT 10.0.14393 
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Hardik\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "-g" "react-flux-starter-kit" 
npm ERR! node v6.9.5 
npm ERR! npm v4.2.0 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 

npm ERR! [email protected] postinstall: bash setup.sh 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'bash setup.sh'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the react-flux-starter-kit package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR! bash setup.sh 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR! npm bugs react-flux-starter-kit 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR! npm owner ls react-flux-starter-kit 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR! C:\Users\Hardik\AppData\Roaming\npm-cache_logs\2017-02-22T10_01_48_356Z-debug.log 

請幫助我,我怎麼可以運行帶有打字稿反應的助焊劑

你能告訴我如何使用助焊劑打字稿反應?我對反應和打字稿很陌生。我不知道該怎麼做?在打字稿中是否有任何方法 - 通過我們可以選擇已經在HTML頁面中的DOM元素 - 例如JQuery $("#root")

而我也陷入了在.tsx文件中使用var abc=require("./menu");。 這是給我下面的編譯時錯誤: 錯誤的[在裝載機]的src \分量\ menu.tsx:2:9

TS2304: Cannot find name 'require'. 

我使用的WebPack作爲一個編譯器。

回答