2017-09-21 69 views
0

我想從此鏈接運行通用入門工具包:https://github.com/ng-seed/universal即使我已按照步驟安裝紗線,但運行命令運行服務器時,它給了我下面的錯誤:即使安裝紗線也找不到模塊'紗線'

錯誤:在Function.Module._resolveFilename找不到模塊 '絲' (module.js:469:15) 在Function.resolve(內部/ module.js:27: 19) at DllBundlesControl.getPackageJsonPath(/home/themadhatter/sites/brandyd-relaunch/node_modules/src/DllBundlesControl.ts:237:39) at DllBundlesControl.getPackageJson(/ home/themadhatter/sites/brandyd-relaunch/node_modules/SRC/DllBundlesCont rol.ts:224:32) 。 。 。

當我在我的目錄中運行命令「紗」,它給了我下面的消息: 紗安裝V1.0.2 [1/4]解析包... 成功已經跟上時代的。 在2.10s完成。

我試過谷歌搜索,還有錯誤的其他包丟失,但紗線本身沒有錯誤丟失。我可以看到模塊在錯誤中丟失的位置,但我似乎無法理解爲什麼即使安裝了模塊也不能遞歸地進入紗線模塊。

回答

1

確保你做npm install yarn -g安裝紗 - 這將您的機器上安裝全球紗線,做不到這一點,你可以使用NPM做npm install安裝的軟件包,這將有因爲這樣做yarn install同樣的效果。