簡體   English   中英

npm無法在服務器上啟動

[英]npm cannot start on server

我已經創建了第一個Angular2應用程序,並且想要將其部署在服務器上。 在我的開發平台上,該應用程序運行正常(在Windows上為Pycharm),並且在服務器上運行該應用程序時,出現以下錯誤。 我不知道怎么了? 可以在https://github.com/DamenShipyards/DatabaseChecksFrontend上找到該代碼

C:\DatabaseChecksFrontend>npm start

> DatabaseChecksFrontend@1.0.0 start C:\DatabaseChecksFrontend
> tsc && concurrently "npm run tsc:w" "npm run lite"

app/app.module.ts(8,30): error TS2307: Cannot find module './check.component'.
app/app.module.ts(9,31): error TS2307: Cannot find module './groups.component'.
app/app.module.ts(10,29): error TS2307: Cannot find module './grid.component'.
app/app.module.ts(11,38): error TS2307: Cannot find module './highlightcode.dire
ctive'.

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.9.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! DatabaseChecksFrontend@1.0.0 start: `tsc && concurrently "npm run tsc:w
" "npm run lite" `
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the DatabaseChecksFrontend@1.0.0 start script 'tsc && concurr
ently "npm run tsc:w" "npm run lite" '.
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 DatabaseChecksFronten
d package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc && concurrently "npm run tsc:w" "npm run lite"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs DatabaseChecksFrontend
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls DatabaseChecksFrontend
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\DatabaseChecksFrontend\npm-debug.log

可能是因為您在沒有sudo特權的情況下運行npm。 您可以在npm的以下官方文檔中了解有關此問題的更多信息: npm許可問題

有沒有命名的文件./check.component.ts./groups.component.ts./grid.component.ts./highlightcode.directive.ts在您的應用程序文件夾中。 您只能從實際存在的模塊中導入某些內容。

也許它對您的開發有效,因為您的文件夾很臟。 在其他地方克隆相同的存儲庫,然后嘗試再次運行它,它將失敗。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM