Error parsing triggers: Cannot find module 'modelo'
I am getting a very weird issue while trying to run the sample for stripe-firebase
I have spent hours searching for this but I cant find that I have used 'modelo' module anywhere. I am really stuck.
I simply used the index.js , package.json file that was used in the example, recreated my directory but the same error again.
Seems it was a problem with my npm installation. Solved
Would be great if you could explain what actually was wrong because I have the same issue here.
same issue here as well.. just started happening...
I just started experiencing this issue in the last hour or two, having been deploying functions successfully earlier in the day.
The fun part for me is: I am trying to get the local emulator working, which fails with this. Did not test deploying today.
Does somebody know whether it is possible to actually pin modelo to 4.2.0 for npm install -g firebase-tools ? Install modelo 4.2.0 globally? Revert to previous tools?
I pushed up 4.2.2 which reverts the NPM config change and fits within the semver pinning that most projects are using to pull in modelo. See if that has provided any relieve.
If you can provide me with any of the error output I'd appreciate it. I'm looking into reproducing and fixing this issue.
just have this issue since 2 hours, anybody found the turnaroud ? Code in file index.js can't be loaded. Did you list all required modules in the package.json dependencies? Detailed stack trace: Error: Cannot find module 'modelo'
@kevinconway I reinstalled npm install -g firebase-tools and ensured modelo is up to 4.2.2 which it is, but calling firebase experimental:functions:shell still causes
! functions: Cannot start emulator. Error: Cannot find module 'modelo'
There is nothing more, when I run firebase --debug I get some private firebase urls to my projects but nothing there to troubleshoot.
Here is the header
> firebase --debug experimental:functions:shell
[2018-01-06T17:57:17.412Z] ----------------------------------------------------------------------
[2018-01-06T17:57:17.415Z] Command: c:\program files\nodejs\node.exe C:\Users\<User>\AppData\Roaming\npm\node_modules\firebase-tools\bin\firebase --debug experimental:functions:shell
[2018-01-06T17:57:17.416Z] CLI Version: 3.16.0
[2018-01-06T17:57:17.417Z] Platform: win32
[2018-01-06T17:57:17.417Z] Node Version: v7.2.1
[2018-01-06T17:57:17.417Z] Time: Sat Jan 06 2018 18:57:17 GMT+0100 (Mitteleuropäische Zeit)
[2018-01-06T17:57:17.417Z] ----------------------------------------------------------------------
<some requests to my firebase account>
...
! functions: Cannot start emulator. Error: Cannot find module 'modelo'
I solved it by deleting installed dependencies and .lock file then running npm install once again.
I believe the issue is resolved. https://github.com/kevinconway/Modelo.js/pull/24 appears to have been the reason for the missing code files.
Yes, version 4.2.3 resolved the problem (locally), but firebase deploy is still failing (maybe some cache issue). Adding a direct peer dependency ("modelo": "^4.2.3") to my package.json solved the problem (temporary). Hope I could remove the direct peer dependency soon.
Yeah, I'm guessing the cached 4.2.2 version is still being used as it satisfies the semver range in the config file. Are you able to run npm cache clean on the machine you're using for build/deploy?
I tried to clean my cache and add a dependency in my package.json has @cyberflohr says. And I still getting the error. Someone was able to solve it in other way? I already unninstalled and installed npm dependencies, deleted cache and deleted lock file
it was working again on deploy during a few minutes, with adding dependenct ("modelo": "^4.2.3") , but now i have :
Build failed: exit status 1 npm ERR! Linux 4.4.0-103-generic npm ERR!
@FrangSierra I had some issues later on too. Looks like I had still references to older modelo in other packages. I searched for all package.json (global npm install) and my local package and replaced them by 4.2.3. Then I installed this version locally and globally and everything works now. I suppose that there is still some other package using the old one. The packages I found beside firebase-tools:
- google-cloud/common
- google-cloud/grpc
and their children.
Exactly @dcfax , I got that error now after add the modelo dependency
I have installed modelo package both locally and globally, but still get deployment error
I can't weight in on the NPM error, but I've removed the invalid modelo versions from NPM such that they should no longer be pulled in for npm install. Continued errors related to missing modelo files will likely be due to some kind of caching or stale data on a machine.
I've resolved simply with npm cache clean --force; npm install [email protected]