-
Notifications
You must be signed in to change notification settings - Fork 18
Ionic 3 with Lazy Loading Module Not Found Error #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you post your |
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5"
},
"include": [
"src/**/*.ts",
"node_modules/ng4-fittext/*.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
} This is the stock file as it comes from the Ionic CLI, except for the |
Try removing |
Removing that line allows the app to run locally using the Ionic live reloading server just fine. Yay! However, when trying to build using
|
ok so we are back to this... When I had this issue, I ended up adding a
|
Adding the
And the new error:
|
I wouldn't change your baseUrl, we have the url info coming from a server so we needed it clear. Try updating to v1.1.0 from npm. it should bypass some of this nonsense now. |
Before upgrading to [email protected]So it looks like this error is taking place because the optimization compiler cannot find After upgrading to [email protected]I had to change the import statement in the
to
!! BUT IT WORKED !! The build went through successfully! Not sure what wizardy you did in that update, but things are looked better (at least for me). Still need to run through the whole Ionic gammut of commands to get an app built, but I definitely owe you a beer. Let me know where/how I can tip you for your time. I'll keep this post updated with any new happenings. (I may also blog about this if you don't mind- since it was a huge learning experience (read: pain in the ass) for me) 😆 For posterity purposes, here is the final tsconfig.json (in case some poor soul run across these issues at a later time) {
"compilerOptions": {
"baseUrl": "",
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5",
"paths": {
"@angular/*": ["node_modules/@angular/*"]
}
},
"include": [
"src/**/*.ts",
"node_modules/ng4-fittext/*.d.ts"
],
"exclude": [
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
} |
Yeah, I updated the docs in npm in v1.1.1 (that was the only change from 1.1.0 to 1.1.1), I just need to push it to git. I'm now having a very strange problem of the actual directive not working at all. I'm not sure what happened but you may want to test the usage before you buy that beer. |
I will start testing usage ASAP. Just happy to get past those build errors. They were starting to affect my vision. Let me know if there's anything you need me to test out or try. You've gone above and beyond. I'll do anything I can to help out. |
It does look like the directive isn't being recognized. I get the following errors when trying to use it:
|
Do you have CUSTOM_ELEMENTS_SCHEMA in your app.module.ts? |
I did not. I added it to the EditI had actually attached However, after reassigning the parent element, I got the following error |
It's working now. steps:
it works. |
so something changed with the html implementation. Probably due to an update with angular, or a way ng-packagr compiles the code. now there is a requirement for a parent container so instead of:
now this has to have a parent container with a block level set width, so:
Alternatively, you could set a width on the body of your app itself (like 100%), and that should fix it. I made this for the way I normally make apps, with a CSS lib like bootstrap using their grid pattern with containers. I'll modify it to not need this width but for now it should work. Closing this issue for now. If you want to work on it, feel free to issue a pull-request |
There was some discussion in #2 about the initial error. I have created a much cleaner repo and tried to import the ng4-fittext module into my
app.module.ts
file, but I get the following error when attempting to runionic serve
.Runtime Error Module build failed: Error: ENOENT: no such file or directory, open '/Users/brockellis/Code/itpg-2/node_modules/ng4-fittext/ng4fittext.js'
This, luckily, seems like a much more straight forward error than the ones being discussed in #2. 😄
I have tried adding
"node_modules/ng4-fittext/*.ts"
to my includes statement in tsconfig.json, but to no avail. There is indeed no.js
file in this package. I'm sure this is a simple setting needed to point the module loader to the.ts
file instead, but I am not quite sure what it is.Here is my ionic info:
The text was updated successfully, but these errors were encountered: