2016-11-04 2 views
0
starten

Ich habe meine erste Angular2-Anwendung erstellt, und ich möchte es auf einem Server bereitstellen. Auf meiner Entwicklungsplattform läuft die Anwendung gut (Pycharm unter Windows) und wenn ich die Anwendung auf dem Server starte, erhalte ich den folgenden Fehler. Ich habe keine Ahnung, was ist los? Der Code kann auf https://github.com/DamenShipyards/DatabaseChecksFrontendnpm kann nicht auf Server

C:\DatabaseChecksFrontend>npm start 

> [email protected] 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! [email protected] start: `tsc && concurrently "npm run tsc:w 
" "npm run lite" ` 
npm ERR! Exit status 2 
npm ERR! 
npm ERR! Failed at the [email protected] 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 

Antwort

0

vielleicht finden es ist, weil Sie npm ohne sudo Privilegien auszuführen. Sie können an den folgenden offiziellen Dokumente von npm mehr zu diesem Thema lesen: npm permission issue

+0

'sudo' ist das beste –

0

Es gibt keine Dateien mit dem Namen ./check.component.ts, ./groups.component.ts, ./grid.component.ts und ./highlightcode.directive.ts in der App-Ordner. Sie können nur etwas aus Modulen importieren, die tatsächlich existieren.

Vielleicht funktioniert es auf Ihre Entwicklung, weil Sie einen schmutzigen Ordner haben. Klonen Sie das gleiche Repository woanders und versuchen Sie es erneut, es sollte fehlschlagen.