ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'
I am getting ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' when I run ng build --prod, but if I run the command ng build --env=prod I get success.
Do we have any differences between these commands?
import React, { Component } from 'react'; import logo from './logo.svg'; import './image.css'; import Dropdown from 'react-dropdown'; import axios from 'axios'; import { AppRegistry, View, Image,Text, } from 'react-native'; // import 'react-dropdown/style.css';
class App extends Component { state= { selectedFile:null } fileSelectHandler=event=>{ // console.log(event.target.files[0]); this.setState({ selectedFile:event.target.files[0] }) // fileUploadHandler=() => // { // axios.post('') // // } }
render() {
return (
<div className="image-upload">
<View>
<Image
source={require('D:\ofc\firstapp\src\bmw.jpg')}
/>
</View>
</div>
);
} }
export default App;
m geeting error of ./src/practicee.js Module not found: Can't resolve 'D:ofcirstappsrcmw.jpg' in 'D:\ofc\firstapp\src'
can anyone help me
geeting error of ./src/practicee.js Module not found: Can't resolve 'D:ofcirstappsrc�mw.jpg' in 'D:\ofc\firstapp\src'
can anyone help me
import React, { Component } from 'react'; import logo from './logo.svg'; import './image.css'; import Dropdown from 'react-dropdown'; import axios from 'axios'; import { AppRegistry, View, Image,Text, } from 'react-native';
class App extends Component { state= { selectedFile:null } fileSelectHandler=event=>{ this.setState({ selectedFile:event.target.files[0] })
}
render() {
return (
<div className="image-upload">
<View>
<Image
source={require('D:\ofc\firstapp\src\bmw.jpg')}
/>
</View>
</div>
);
} }
export default App;
Trying to build AOT but still unsuccessful! Even tried #7113 solution. But still error persists.kindly help Thanks! @filipesilva @Brocco
current cli version installed:

Error screen shot

This command is 100% work for solving this problem. npm install [email protected]
I have the same issue Angular CLI version : 1.0.0 angular version : 4 node : v8.11.3 When I fired ng build --prod then throwing the below error
ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/home/user2/Project/test/streetworkapp/material/loan_calculator/src' @ ./src/main.ts 5:0-74 @ multi ./src/main.ts
ERROR in ./src/$$_gendir async Module not found: Error: Can't resolve '/home/user2/Project/test/streetworkapp/material/loan_calculator/src/$$_gendir/app/routes/home/home.module.ngfactory.ts' in '/home/user2/Project/test/streetworkapp/material/loan_calculator/src/$$_gendir' @ ./src/$$_gendir async @ ./~/@angular/core/@angular/core.es5.js @ ./src/main.ts @ multi ./src/main.ts
ERROR in ./src/$$_gendir async Module not found: Error: Can't resolve '/home/user2/Project/test/streetworkapp/material/loan_calculator/src/$$_gendir/app/routes/loan/loan.module.ngfactory.ts' in '/home/user2/Project/test/streetworkapp/material/loan_calculator/src/$$_gendir' @ ./src/$$_gendir async @ ./~/@angular/core/@angular/core.es5.js @ ./src/main.ts @ multi ./src/main.ts
I have tried with upgrading the @angular/cli latest version as well but I am not able to resolved that production issues.
Please expert team help me.
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.