jelbourn / material2-app

Simple app that consumes Angular Material 2 components
651 stars 280 forks source link

npm start on Windows 10 #29

Open KevinBurton opened 7 years ago

KevinBurton commented 7 years ago

I get an error when I try to start the application

npm ERR! Windows_NT 10.0.14393 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.2 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR! m2-app@0.0.0 start: ng serve npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the m2-app@0.0.0 start script 'ng serve'. 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 m2-app package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ng serve npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs m2-app npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls m2-app npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Kevin\Projects\AngularIo\material2-app\npm-debug.log

node is v6.9.2. npm is 3.10.9.

There isn't a 'npm-debug.log' that gives much more information.

When I run 'ng serve' directly I get

Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options. Error: Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options. at Object.resolveEntryModuleFromMain (C:\Users\Kevin\Projects\AngularIo\material2-app\node_modules\@ngtools\webpack\src\entry_resolver.js:131:11) at AotPlugin._setupOptions (C:\Users\Kevin\Projects\AngularIo\material2-app\node_modules\@ngtools\webpack\src\plugin.js:158:54) at new AotPlugin (C:\Users\Kevin\Projects\AngularIo\material2-app\node_modules\@ngtools\webpack\src\plugin.js:17:14) at Object.exports.getWebpackNonAotConfigPartial (C:\Users\Kevin\Projects\AngularIo\material2-app\node_modules\angular-cli\models\webpack-build-typescript.js:20:13) at new NgCliWebpackConfig (C:\Users\Kevin\Projects\AngularIo\material2-app\node_modules\angular-cli\models\webpack-config.js:23:42) at Class.run (C:\Users\Kevin\Projects\AngularIo\material2-app\node_modules\angular-cli\tasks\serve-webpack.js:20:22) at C:\Users\Kevin\Projects\AngularIo\material2-app\node_modules\angular-cli\commands\serve.js:102:26 at process._tickCallback (internal/process/next_tick.js:103:7)

pmizuno commented 7 years ago

What's in your main.ts?

eladh commented 7 years ago

me too.

the main.ts is just checked from Master : https://github.com/jelbourn/material2-app/blob/master/src/main.ts

micke-a commented 7 years ago

I get the same error on a after trying to start a clone just now


mailm@DESKTOP-E4BRND9 MINGW64 /c/dev/checkouts/material2-app (master)
$ ng serve
Your global Angular CLI version (1.0.0-beta.26) is greater than your local version (1.0.0-beta.28.3). The local Angular CLI version is used.
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options.
Error: Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options.
    at Object.resolveEntryModuleFromMain (C:\dev\checkouts\material2-app\node_modules\@ngtools\webpack\src\entry_resolver.js:131:11)
    at AotPlugin._setupOptions (C:\dev\checkouts\material2-app\node_modules\@ngtools\webpack\src\plugin.js:174:50)
    at new AotPlugin (C:\dev\checkouts\material2-app\node_modules\@ngtools\webpack\src\plugin.js:21:14)
    at Object.exports.getNonAotConfig (C:\dev\checkouts\material2-app\node_modules\angular-cli\models\webpack-configs\typescript.js:26:13)
    at new NgCliWebpackConfig (C:\dev\checkouts\material2-app\node_modules\angular-cli\models\webpack-config.js:24:37)
    at Class.run (C:\dev\checkouts\material2-app\node_modules\angular-cli\tasks\serve.js:31:29)
    at C:\dev\checkouts\material2-app\node_modules\angular-cli\commands\serve.run.js:22:22
    at process._tickCallback (internal/process/next_tick.js:103:7)

mailm@DESKTOP-E4BRND9 MINGW64 /c/dev/checkouts/material2-app (master)
$ node --version
v6.5.0

mailm@DESKTOP-E4BRND9 MINGW64 /c/dev/checkouts/material2-app (master)
$ npm --version
3.10.3
Newbieee commented 7 years ago

I faced the same error. It seems there is the another thread running on the same issue. I found the resolution HERE