Skip to content

ionic2 rc0 chrome browser cannot find typescript .ts file #8292

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

Closed
tianleios opened this issue Sep 29, 2016 · 84 comments
Closed

ionic2 rc0 chrome browser cannot find typescript .ts file #8292

tianleios opened this issue Sep 29, 2016 · 84 comments
Assignees
Labels
needs: reply the issue needs a response from the user
Milestone

Comments

@tianleios
Copy link

when i debug in chrome browser, i canot find .ts typescript file there only has .js file. i cannot debug like before.

@marcoturi
Copy link

duplicated #8298

@danbucholtz
Copy link
Contributor

This is a duplicate of #8292, so let's track it there. I'm going to close this for now.

Thanks,
Dan

@danbucholtz
Copy link
Contributor

Whoops, that is this issue, so let's leave it open. LOL!

Thanks,
Dan

@tianleios
Copy link
Author

if Source map file is not available in browser for debugging code. i will cannot work with ionic RC!!!!. i hope ionic team resolve this problem

@six006
Copy link

six006 commented Sep 30, 2016

So bad design

@ecureuill
Copy link

If I run ionic serve, I have source maps for/app, /pipes,/providers, and /pages is missing, no typescritp files

If I run ionic serve --lab, I have no /.tmp

@danbucholtz
Copy link
Contributor

We are working on this. This is a high priority item for us.

Thanks,
Dan

@jourdan-jobox
Copy link

Great to see Ionic is working on this; just a +1 here because this is an issue for me as well, but I will work around this as best as I can and try to guess when I debug :)

@danielabbatt
Copy link
Contributor

FYI - This also affects trying to debug in Visual Studio Code using the cordova tools extension. Used to work like a dream in both the browser using serve and directly on a device. Now all I get is the console output coming through, no breakpoints will fire.

@danbucholtz
Copy link
Contributor

When I run ionic serve, I see source maps to transpiled JS. It is pretty straight forward to debug IMO. What are you seeing, and what would you like to see?

Thanks,
Dan

@mirata
Copy link

mirata commented Oct 2, 2016

I can give you some screenshots of the issue if you would like. Basically in previous versions, the chrome debugger would show all the .ts files. Now it simply shows main.js. None of my pages .ts files appear. If you are getting map files with ionic serve and are able to debug code in your pages, then that's better than what I am experiencing.

@AntonioRossi
Copy link

@mirata, it is the same for me.
I'm using nvm and tried two different install of ionic and two different startup 'tabs' project, the pages.ts files does not appear both with node versions 4.6.0 and 6.7.0.

In all cases this is what I get:

ionic2 debug

@Thavarajan
Copy link

Thavarajan commented Oct 2, 2016

Actually the scripts are transpiled , and i can able to see the scripts in the pages folder , but i am not able to see that pages folder in the sources tab,

just a suggesstion
i think the rollup remove the relation between the map file and the script file

@AntonioRossi
Copy link

@danbucholtz
I understand that is possible to debug the transpiled main.js file, with all the pages.ts inside it.
I also take for granted that rollup.js generates a code that is more optimized than webpack.

In any case could it be possible to have the previous ionic scripts of the webpack-gulp combination of tools so as to use them during the development?

In my opinion it is much simpler to debug with the separated .ts files, then to have the possibility to use rollup.js for a production build would be optimal and greatly appreciated.

@danbucholtz
Copy link
Contributor

@AntonioRossi, at this time, no. We will get source maps working. This is a high priority item for us.

I have a hunch the vast majority of changes for RC1 will be in app-scripts, unless there is a major bug found in the framework itself. We are iterating quickly on app-scripts as we're not satisfied with what we've produced so far.

Thanks,
Dan

@cocowalla
Copy link

@danbucholtz I'm not sure if you're saying that the source map issue won't be fixed until RC1?

If so, will a workaround be published beforehand? This is a really big problem, and I'd really rather not wait for a new RC to be built, tested and published.

@eddyng8
Copy link

eddyng8 commented Oct 3, 2016

I was using Visual Studio to build and debug my ionic beta project. However, since rc0, I could not even build my project using Visual Studio anymore. Please note that I'm not even talking about debugging it.

@danielabbatt (or whoever else knows the answer), you mentioned that you also use VS. Do you have to change anything in your Visual Studio to be able to build Ionic2 rc0 project?

@PhilippRath
Copy link

@eddyng8 did you follow the upgrade path in the Changelog?

@eddyng8
Copy link

eddyng8 commented Oct 3, 2016

Yes I did. I could build my project using "ionic build android" and ran it on my device using "ionic run android". So, I knew I followed everything in the Changelog correctly.

Let me back track a little bit. When I used ionic2 beta, I followed the following article to get my ionic2 project built and debugged in VS: https://blogs.msdn.microsoft.com/rido/2016/05/11/ionic2-and-visual-studio/. However, after upgraded my ionic2 to rc0 and followed the same steps again (minus the part that talked about gulp because the gulp built is removed in rc0), I got the following error when pressing F5 in VS:

MSB6006 tsc.exe exited with code 1. File: Microsoft MDA.FileMirroring.targets line 387

Also, I made sure that VS uses the same Node and npm version as when I did everything in command line by setting the path of the external tools as described in this article: https://blogs.msdn.microsoft.com/webdev/2015/03/19/customize-external-web-tools-in-visual-studio-2015/.

I hope somebody already figured out on how to use ionic2 rc0 in Visual Studio and can help me here. My goal is to be able to press F5 and run the app in the emulator via VS. And I know the debugging with ionic2 rc0 is not working. But when it works, of course I would like to be able to debug using VS again.

@CKGrafico
Copy link

Amazing...

@xx0r
Copy link

xx0r commented Oct 4, 2016

VS went fine with Ionic2 Beta, but after upgrading it to RC0 i get:

Build:Cannot find module './app.module.ngfactory'

however, ionic build passes and ionic serve works too

@PhilippRath
Copy link

@xx0r thats in probably in the main.prod.ts, seams to me like the former Theme File linking to build directory, the file created at the build process and is available when you ionic serve under no-domain folder in the ChromeDevTools under scripts.

maybe you could comment it out and use the --dev parameter in package.json after build to force build with dev flag

@ovitrif
Copy link

ovitrif commented Oct 4, 2016

Still no solution for this?

@frostbytedata
Copy link

+1 Also seeing this issue. Any dirty workarounds until we see a fix?

@danbucholtz danbucholtz self-assigned this Oct 5, 2016
@brandyscarney brandyscarney modified the milestones: 2.0.0-rc.1, 2.0.0-rc.2 Oct 13, 2016
@mirata
Copy link

mirata commented Oct 14, 2016

Seems like the latest script changes have fixed the typescript debugging issue for me. However changing html files does not update automatically if using ionic serve. I need to restart each time which is a massive pain. Anyone experiencing this?

@danbucholtz
Copy link
Contributor

@mirata,

What version are you on? We published two versions tonight. I think this should be fixed in 0.0.32, but I could be wrong.

Thanks,
Dan

@brandyscarney brandyscarney modified the milestones: 2.0.0-rc.1, 2.0.0-rc.2 Oct 14, 2016
@mirata
Copy link

mirata commented Oct 17, 2016

@danbucholtz Sorry, never mind. I cleared my npm cache, reinstalled dependencies and the issue seems to be resolved.

@eidng8
Copy link

eidng8 commented Nov 1, 2016

Sorry to bump in a closed issue, but is this solved?

I'm on RC1 with app-script 0.0.39, deleted the whole node-modules directory, and run npm install again. I can't find any ts source in Chrome, just a bunch of transpiled js files under webpack://./.tmp/

@tobiasfiechter
Copy link

Hi, I just updated app-scripts and I got the same problem again somehow...
ts files

no ts files to debug
The command I use is ionic serve with:
"build": "ionic-app-scripts build --dev",
"watch": "ionic-app-scripts watch --dev",
"serve:before": "watch",

@mirata
Copy link

mirata commented Nov 4, 2016

This was fixed and now its not.

@Xepe
Copy link

Xepe commented Nov 5, 2016

I tested it using app-scripts version 0.0.36 and it works. But using app-scripts / versions 0.0.37, 0.0.38 and 0.0.39 it fails.

Hope this helps.

@guillefd
Copy link

guillefd commented Nov 5, 2016

When updating app-scripts or ionic, I always delete the folders /.tmp ,
/www, and /node_modules, then run 'npm install', this avoids me a lot of
issues.

On Sat, 5 Nov 2016, 3:14 a.m. Jose Blanco, [email protected] wrote:

I tested it using the version 0.0.36 and it works. But using the versions
0.0.37, 0.0.38 and 0.0.39 it fails.

Hope this helps.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#8292 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABCQy7lec8ol_EOePINBErSm1TYrKCg4ks5q7B7HgaJpZM4KJ6V6
.

@andybeaulieu
Copy link

andybeaulieu commented Nov 5, 2016

It looks like the plan is for souremaps to be fixed in app-scripts version 0.0.40.

You can see this thread, skip to the bottom -

ionic-team/ionic-app-scripts#289

@Rainson12
Copy link

Rainson12 commented Nov 11, 2016

debugging again doesn't work with RC2 and Appscripts 0.0.43. Tested it in VS 2015

@danbucholtz
Copy link
Contributor

danbucholtz commented Nov 11, 2016

@Rainson12, use Chrome or a browser for debugging for now. We are using the default Webpack sourcemap set-up so it may or may not work with various IDEs. We will get this fixed ASAP.

Thanks,
Dan

@eddyng8
Copy link

eddyng8 commented Nov 11, 2016

I tried 0.0.43 in Chrome. I could see the *.ts files. But the content was a somewhat modified version of my *.ts files (it looks like WebPack modified them because it has a lot of WebPack decorators in there). I just want to know whether this is expected since WebPack is used instead of rollup? Back in 0.0.36, I saw the original content of *.ts files when debugging. I can live with this if this is the expected results. I just want to make sure that I didn't miss anything.

@danbucholtz
Copy link
Contributor

@eddyng8,

We are using cheaper/faster eval source maps right now by default. You can change them to be the original Typescript source map but the build will be slower. See this blog for more info.

Thanks,
Dan

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: reply the issue needs a response from the user
Projects
None yet
Development

No branches or pull requests