angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.73k stars 11.98k forks source link

After copying Angular4+firebase3 project from Win 10 to macOS, ng serve does not work. #7101

Closed alaingoodarzi closed 7 years ago

alaingoodarzi commented 7 years ago

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Repro steps.

The log given by the failure.

ERROR in /Users/username/.Trash/myForm 2.40.55 PM/src/app/Shared/services/record.service.ts (6,87): Cannot find module 'angularfire2/database'.

ERROR in /Users/username/.Trash/myForm 2.40.55 PM/src/app/Shared/services/record.service.ts (7,27): Cannot find module 'firebase/app'.

ERROR in /Users/username/.Trash/myForm 2.40.55 PM/src/app/Shared/lists/field10list/recordlist.service.ts (6,87): Cannot find module 'angularfire2/database'.

ERROR in /Users/username/.Trash/myForm 2.40.55 PM/src/app/Shared/lists/field10list/recordlist.service.ts (7,27): Cannot find module 'firebase/app'.

ERROR in /Users/username/.Trash/myForm 2.40.55 PM/src/app/app.module.ts (14,35): Cannot find module 'angularfire2'.

ERROR in /Users/username/.Trash/myForm 2.40.55 PM/src/app/app.module.ts (15,93): Cannot find module 'angularfire2/database'.

ERROR in Error encountered resolving symbol values statically. Could not resolve angularfire2 relative to /Users/username/.Trash/myForm 2.40.55 PM/src/app/app.module.ts., resolving symbol AppModule in /Users/username/.Trash/myForm 2.40.55 PM/src/app/app.module.ts, resolving symbol AppModule in /Users/username/.Trash/myForm 2.40.55 PM/src/app/app.module.ts, resolving symbol AppModule in /Users/username/.Trash/myForm 2.40.55 PM/src/app/app.module.ts

ERROR in multi ./src/styles.css Module not found: Error: Can't resolve 'css-loader?{"sourceMap":false}' in '/Users/username/.Trash/myForm 2.40.55 PM' @ multi ./src/styles.css

ERROR in ./src/app/app.module.ts Module not found: Error: Can't resolve 'angularfire2' in '/Users/username/.Trash/myForm 2.40.55 PM/src/app' @ ./src/app/app.module.ts 17:0-49 @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./src/app/app.module.ts Module not found: Error: Can't resolve 'angularfire2/database' in '/Users/username/.Trash/myForm 2.40.55 PM/src/app' @ ./src/app/app.module.ts 18:0-66 @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./~/webpack-dev-server/client?http://localhost:4200/ Module not found: Error: Can't resolve 'webpack/hot/emitter' in '/Users/username/.Trash/myForm 2.40.55 PM/node_modules/webpack-dev-server/client' @ ./~/webpack-dev-server/client?http://localhost:4200/ 144:19-49 @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./src/app/app.component.ts Module not found: Error: Can't resolve 'postcss-loader' in '/Users/username/.Trash/myForm 2.40.55 PM' @ ./src/app/app.component.ts 19:21-51 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./src/app/Shared/lists/field10list/recordlist.service.ts Module not found: Error: Can't resolve 'angularfire2/database' in '/Users/username/.Trash/myForm 2.40.55 PM/src/app/Shared/lists/field10list' @ ./src/app/Shared/lists/field10list/recordlist.service.ts 12:0-60 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./src/app/Shared/lists/field10list/field10list.component.ts Module not found: Error: Can't resolve 'postcss-loader' in '/Users/username/.Trash/myForm 2.40.55 PM' @ ./src/app/Shared/lists/field10list/field10list.component.ts 30:21-59 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./~/webpack-dev-server/client/socket.js Module not found: Error: Can't resolve 'sockjs-client' in '/Users/username/.Trash/myForm 2.40.55 PM/node_modules/webpack-dev-server/client' @ ./~/webpack-dev-server/client/socket.js 1:13-37 @ ./~/webpack-dev-server/client?http://localhost:4200/ @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./src/app/form1/form1.component.ts Module not found: Error: Can't resolve 'postcss-loader' in '/Users/username/.Trash/myForm 2.40.55 PM' @ ./src/app/form1/form1.component.ts 91:21-53 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./src/app/Shared/services/record.service.ts Module not found: Error: Can't resolve 'angularfire2/database' in '/Users/username/.Trash/myForm 2.40.55 PM/src/app/Shared/services' @ ./src/app/Shared/services/record.service.ts 11:0-60 @ ./src/app/form1/form1.component.ts @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts webpack: Failed to compile.

alaingoodarzi commented 7 years ago

I tried to install angularfire2: npm install angularfire2 firebase --save And getting this error messages in console: As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release, which will only support Node 6.9 and greater. This package will be officially deprecated shortly after.

To disable this warning use "ng set --global warnings.packageDeprecation=false".

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" NG Live Development Server is running on http://localhost:4200. 11% building modules 9/17 modules 8 active ...rm 2.40.55 PM/node_modules/rxjs/Rx.jswebpack: wait until bundle finished: / Hash: edf2d678d373e92a3edd e Time: 7873ms chunk {0} polyfills.bundle.js, polyfills.bundle.map (polyfills) 232 kB {4} [initial] [rendered] chunk {1} main.bundle.js, main.bundle.map (main) 30.3 kB {3} [initial] [rendered] chunk {2} styles.bundle.js, styles.bundle.map (styles) 28 bytes {4} [initial] [rendered] chunk {3} vendor.bundle.js, vendor.bundle.map (vendor) 3.2 MB [initial] [rendered] chunk {4} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]

WARNING in ./~/angularfire2/angularfire2.js 3:26-40 "export 'InjectionToken' was not found in '@angular/core'

WARNING in ./~/angularfire2/app/firebase.app.module.js 3:40-54 "export 'InjectionToken' was not found in '@angular/core'

ERROR in /Users/username/.Trash/myForm 2.40.55 PM/node_modules/angularfire2/app/firebase.app.module.d.ts (1,10): Module '"/Users/username/.Trash/myForm 2.40.55 PM/node_modules/@angular/core/index"' has no exported member 'InjectionToken'.

ERROR in /Users/username/.Trash/myForm 2.40.55 PM/node_modules/angularfire2/angularfire2.d.ts (3,10): Module '"/Users/username/.Trash/myForm 2.40.55 PM/node_modules/@angular/core/index"' has no exported member 'InjectionToken'.

ERROR in Error encountered resolving symbol values statically. Calling function 'InjectionToken', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol FirebaseAppConfigToken in /Users/username/.Trash/myForm 2.40.55 PM/node_modules/angularfire2/app/firebase.app.module.d.ts, resolving symbol FirebaseAppConfigToken in /Users/username/.Trash/myForm 2.40.55 PM/node_modules/angularfire2/app/index.d.ts, resolving symbol AngularFireModule.initializeApp in /Users/username/.Trash/myForm 2.40.55 PM/node_modules/angularfire2/angularfire2.d.ts, resolving symbol AppModule in /Users/username/.Trash/myForm 2.40.55 PM/src/app/app.module.ts, resolving symbol AppModule in /Users/username/.Trash/myForm 2.40.55 PM/src/app/app.module.ts

ERROR in multi ./src/styles.css Module not found: Error: Can't resolve 'css-loader?{"sourceMap":false}' in '/Users/username/.Trash/myForm 2.40.55 PM' @ multi ./src/styles.css

ERROR in ./~/webpack-dev-server/client?http://localhost:4200/ Module not found: Error: Can't resolve 'webpack/hot/emitter' in '/Users/username/.Trash/myForm 2.40.55 PM/node_modules/webpack-dev-server/client' @ ./~/webpack-dev-server/client?http://localhost:4200/ 144:19-49 @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./src/app/app.component.ts Module not found: Error: Can't resolve 'postcss-loader' in '/Users/username/.Trash/myForm 2.40.55 PM' @ ./src/app/app.component.ts 19:21-51 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./src/app/Shared/lists/field10list/field10list.component.ts Module not found: Error: Can't resolve 'postcss-loader' in '/Users/username/.Trash/myForm 2.40.55 PM' @ ./src/app/Shared/lists/field10list/field10list.component.ts 30:21-59 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./~/webpack-dev-server/client/socket.js Module not found: Error: Can't resolve 'sockjs-client' in '/Users/username/.Trash/myForm 2.40.55 PM/node_modules/webpack-dev-server/client' @ ./~/webpack-dev-server/client/socket.js 1:13-37 @ ./~/webpack-dev-server/client?http://localhost:4200/ @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./src/app/form1/form1.component.ts Module not found: Error: Can't resolve 'postcss-loader' in '/Users/username/.Trash/myForm 2.40.55 PM' @ ./src/app/form1/form1.component.ts 91:21-53 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

ERROR in ./~/firebase/app/shared_promise.js Module not found: Error: Can't resolve 'promise-polyfill' in '/Users/username/.Trash/myForm 2.40.55 PM/node_modules/firebase/app' @ ./~/firebase/app/shared_promise.js 37:35-62 @ ./~/firebase/app/firebase_app.js @ ./~/firebase/app.js @ ./~/firebase/database.js @ ./~/angularfire2/database/database.js @ ./~/angularfire2/database.js @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts webpack: Failed to compile.

bossysmile11 commented 7 years ago

Unsubscribe

bossysmile11 commented 7 years ago

Unsubscribe from all threads please

alaingoodarzi commented 7 years ago

What do that mean? is there a problem?

filipesilva commented 7 years ago

Heya @alaingoodarzi, I understand you are experiencing a problem but there isn't much I can do to address it from the issue as you have opened it. You haven't provided most of the information needed in the issue template so I don't even know how to start to reproduce, investigate or try to fix the problem.

You can find more some information about how to submit an issue in https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#-submitting-an-issue. Pay special attention to the reproducible scenario bits, as that's easily the most important part.

There is also the question of whether you are submitting a real bug or a support request. A lot of things you might think are bugs are actually misconfiguration or errors in the project code. We try to avoid answering support requests in the CLI issue tracker because it's just not a good medium for that. Stack Overflow is a much better place for support questions. Please have a look at https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#-got-a-question-or-problem as to why that is.

It's very common that one finds that the bug they are reporting is actually a simple misconfiguration when trying to do a minimal reproduction.

So for now I have to close this issue as there just isn't actionable as is. I encourage you to open a new issue with a reproduction if you do find it is a bug in the CLI though, and we'll address it properly.

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.