-
Notifications
You must be signed in to change notification settings - Fork 182
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
Release build failed #113
Comments
I had the same problem. I had to downgrade ionic/app-scripts to version: 1.3.12 and works again. |
Thanks for response ) Strange - I have the same version of ionic/app-scripts as yours.. Can you show your tsconfig.json file? Maybe solution is also in it... |
Sure: |
Hmm... But there is no types specified like in documentation...
So, without them I get another batch of errors... On what chapter are you? ) |
I am building a modified version of the tutorial, a real time schedule for a fitness app, I use the base, but not phone verification, for example. |
I had encountered almost exactly the same errors as you and managed to fix them in the following ways:
For the last issue, of course you need to make sure that |
Tnx to sigalor! I just removed all 'meteor/meteor' but then... I've found that doesn't see such line on build process with --prod flag: So, after making downgrade (read about this issue) to: I have: BUILD SUCCESSFUL |
Have then problem to run debug build version with visual code:
And release version doesn't connect to server (... |
Which command do you use to run the debug build? Btw, a quick Google search showed this. Maybe it can help you. |
Solved if I run by command: But next question is why client can not connect to server under release version... |
So, again: Which command do you currently use to run the server? |
Sorry, my way is little irrelative - tryied to downgrade app-scripts to 1.3.4 then I wish to use latest version. I just hit F5 to 'Serve to the browser (ionic serve)' in visual code - and I can debug client side with latest app-scripts version (2.1.3), but if I use 1.3.4 there is an error described above I have this in .vscode/launch.json:
I think there must be some another way how to build release version with latest app-scripts... but I didn't found it yet... |
To build release (and it is fail with latest app-scripts version):
If I remove --prod then it SUCCESS, but size of resulted apk is multipled x2 and client can't connect to the server side |
Hmm... I think I won't be able to help you further for now. I just started learning Ionic/... around two weeks ago, so I didn't try out a lot yet. Especially these production builds are totally new for me. So, I hope that others from this community can help you better. Or, if you still have this error in a few weeks, maybe I will come back and be able to solve it. :) |
with the last version of ionic, and only with the solution of @sigalor
My problem solved. |
I had a quick look at this issue, Ionic-CLI simply wants all the imports to be located inside the |
@darkbasic Thank you! |
In tsconfig you'll have to change
with
In
to
Symbolic links:
I'm reopening because this bug hasn't still been fixed into the released version of the tuorial, so better keep track of it to help others. |
hello @darkbasic, issue is persisting after changes;
as per your suggestion api folder has been moved under src;content in src/api now;
tsconfig;
webpack config;
packages;
error output;
error continues ... |
Please look carefully at all the |
@iLGunners I have same issue like you and with last suggestion like @darkbasic - about client bundle I think it something wrong with webpack alias... maybe:
@darkbasic I've rechecked all stuff with 'api' word (can you provide some fork with worked build - to look at differences or just configuration files zipped with folder structure)? |
@darkbasic thanks for your response.
@airstep changing webpack alias didn't work. |
@iLGunners I cannot really know how you configured your project and why it doesn't work, I provided a working example and that's the most I can do. This is the output of
Doesn't my example work for you? |
@iLGunners try to use archive that @darkbasic sent to us to find differences release with --prod works for me now in this sample |
@airstep, I have compared. @darkbasic, the differences between your example and my project seem to be only webpack config differences;
|
@iLGunners yes I see... and move forward to integrate this in more complicated project (bcz sample from @darkbasic has early steps integrated like in tutorial), so for now I have some problem with sharp module:
And found solution to add sharp with metor npm install But after that again error with not found collections.... |
Found this fix about sharp issue https://www.bountysource.com/issues/42009721-prod-build-fails But again same errors to collections....
This is hard to understand for complicated scenario. As an example after all topics is done or between 14-18 part |
So, I'm stuck with sharp module now. Like in previous description it is server side package. So to separate from client, we use different places for folders structure for client and server - and we can't use one folder for client and server together.... Carrefully readed about sharp here but this is not work for me with root folder structure like 'src' for client and server "We also used to run the previous command from the api directory, otherwise Meteor would have compiled sharp for the system Meteor version and not the project one. Since we cannot use meteor npm anymore let's stick to the root directory instead." - this done with respect, but not work I have switches beatween errors like:
and after
|
I am trying to create to different webpack configurations like in the example by @darkbasic, but it's not working for me.
My export;
devConfig;
others;
errors;
|
Project Environment
|
Regarding sharp the issue the problem is that if you install it using |
But I use node v8.8.1 |
Should work fine (it does for me). |
But I have this error:
And look how @ ./src/pages/chats/chats.ts in dependence of sharp (why?) But I found that: "Please remember that sharp will not work in a browser; it requires the Node runtime." And error is unclear to me what it does mean "Module parse failed: Unexpected character '�' (1:0)" Character like in screen shot attached |
hello @darkbasic, the differences between your example and my project seem to be only webpack config differences;
our project environment;
|
Yuor webpack config comes from an old version of Ionic. Every now and then they update it and make it better. Mine is from the latest (or at least it was the latest one month ago) version of Ionic. |
Ionic shouldn't be used with ejected |
@darkbasic What you think about sharp module again? |
@darkbasic, okay. I have modified my webpack config according to that found in the mentioned dir. Prod build is still failing. default webpack config from
|
I'm sorry but I cannot help you. The fact that sharp works on my end makes everything more difficult to debug.
I fear you'll have to figure out what's the difference between the tarball I attached and your project. |
@darkbasic No, it doesn't;
|
exactly |
@darkbasic, from below error it seems
error;
environment;
webpack config;
note;
|
For sharp module - fixed like this (webpack.config.js)
|
It completle works for me now with --prod flag! Many thanks to @darkbasic ! My working version in attach for others |
You're welcome. I'll keep it open so other people will found it until it's fixed in the tutorial. |
hello @darkbasic & @airstep,
also,
environment;
|
Yes, it isn't executed. |
@darkbasic , Can the
note;
|
When I try to build app in release mode by command:
ionic cordova build android --prod --release --profile
I get this errors:
Module not found: Error: Can't resolve 'meteor/meteor' in '/home/user/work/personal/ionic/new/chat/src/app' resolve 'meteor/meteor' in '/home/user/work/personal/ionic/new/chat/src/app' Parsed request is a module ... Module not found: Error: Can't resolve 'meteor/underscore' in '/home/user/work/personal/ionic/new/chat/src/pages/chats' resolve 'meteor/underscore' in '/home/user/work/personal/ionic/new/chat/src/pages/chats' Parsed request is a module ... Module not found: Error: Can't resolve 'api/collections' in '/home/user/work/personal/ionic/new/chat/src/pages/chats' resolve 'api/collections' in '/home/user/work/personal/ionic/new/chat/src/pages/chats'
err.txt
But when same thing build in dev mode all is ok...
The text was updated successfully, but these errors were encountered: