-
Notifications
You must be signed in to change notification settings - Fork 899
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
Function emulators throwing incorrect error message "Cannot find module './tsconfig.json' './tsconfig.json' error " #2353
Comments
@pklitscher thank you for the super-simple reproduction! I can see the same bug and I will send a PR with a fix. |
@samtstern Thanks for fixing this so quick. Just in case the issue is more than it seems I thought I'd share the behaviour I am seeing Saw your comment on (#2352) I have been trying to find the issue with my code so pulled everything out and progressively adding back in. But I can't even get the most basic code to work. index.js
scripts/users.js (function commented out for testing)
init/admin.js
This will throw the tsconfig error. If I comment out This code runs in production error free. All directories exist and refs are correct. Will this be resolved in the fix or is it something more? Folder structure
|
I think this will be resolved. If you really want to be sure you can check out the CLI at master, npm build and link, and then try and run it. If you have time I'd definitely appreciate hearing how it goes! |
Hey guys, just finished cracking my head on this problem. A hacky way I did was just to add a tsconfig.json to the root directory with provided options. Here's the example file i sourced it from.(Under the files) Allowed me to see the simple bugs that were causing the cloud function to not run correctly. |
Same problem here. Googling the problem i found this solution: Answer downgrade to 6.3.1 the firebase-tools, but seems to me much oldest, and unproductive without restart after some changes. But send to me a perfect description was happen to cause the error, I was using So, what is happening with meaningful erros? |
This will be resolved in the next release of the Firebase CLI. The fix is already in |
I just tried with master branch, and I got success. The emulator works fine. The issue is fixed. In case you want to try:
@samtstern I would like to know if there is any date time is set when the next version will be released, if yes please share. Thanks very much. |
[REQUIRED] Environment info
firebase-tools: 8.4.2
Platform: Windows 10
[REQUIRED] Test case
I have a set of working and currently deployed functions I am trying to emulate. They are written in JavaScript and the project is not configured for TypeScript.
When I try to emulate my functions I am receiving the following error
Trying to find the problem I init a clean project and wrote the following
index.js
utils/helpers.js
Which worked.
However if I changed the require for helpers to ..utils/helpers (which does not exist) I received the error:
I can only assume there is something in my code emulators does not like however this is the only error message I am getting so I cannot find it. If I remove all code from my index file (in my actual project) and write a simple function the emulators will run.
[REQUIRED] Steps to reproduce
Changed the require for helpers to ..utils/helpers (which does not exist) in index.js
[REQUIRED] Expected behavior
Receive meaningful error message
[REQUIRED] Actual behavior
Receive C:\Github\test-emulators\firebase-debug.log
Project is not written in or configured for TypeScript
firebase-debug.log
firebase-debug.log
The text was updated successfully, but these errors were encountered: