I am trying to learn how to use Cloud Functions, I take this example from github: Example here I just copied the code, But I have this error, what I am doing wrong? there is other examples to do this?:
! functions[imageToJPG]: Deployment error.
Function load error: 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 'mkdirp-promise'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/user_code/index.js:4:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Functions deploy had errors. To continue deploying other features (such as database), run:
firebase deploy --except functions
Error: Functions did not deploy properly.
If you didn't change any of the code at all in the sample, it's almost certain that you didn't run npm install from the functions directory.
Related
I recently just deployed a updated function with a very minor change (nothing that could ever cause a crash!). And all of a sudden, I see this crash error in the logs...
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /user_code/node_modules/firebase-admin/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-glibc/grpc_node.node)
at Error (native)
at Object.Module._extensions..node (module.js:604:18)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/user_code/node_modules/firebase-admin/node_modules/grpc/src/grpc_extension.js:32:13)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/user_code/node_modules/firebase-admin/node_modules/grpc/src/client_interceptors.js:145:12)
UPDATE: Firebase fixed this issue. Thanks for your support!
Investigating an issue with Cloud Functions
Incident began at 2018-05-17 12:05 (all times are US/Pacific)
Check this https://status.firebase.google.com/
If you are still experiencing this issue you can delete and re-deploy the problematic function to the server.
Firebase has updated the status here with that workaround: https://status.firebase.google.com/incident/Functions/18026
It worked for me.
After creating a new app, I get the following error when trying to run it.
module.js:327
throw err;
^
Error: Cannot find module 'fibers'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\tsdmn\tsdmn_system\_development\_01\_01\tsdmn-webportal_dev-01-01\.meteor\local\build\programs\server\boot.js:1:75)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
Exited with code: 1
Your application is crashing. Waiting for file change.
It was working a few days ago, but it just started giving me this error when I run with "meteor". I can create the app without a problem but running it gives and error.
Meteor uses two different package management, via Atmosphere and via NPM.
Atmosphere management is done via the file .meteor/packages. Each line is added when you do a meteor add packageName. When you execute the meteor command it will read this file and download all the atmosphere dependencies.
For NPM, it's the same but the dependencies are listed in the package.json and to install all these dependencies you have to run meteor npm install. This will read the package.json and download everything it needs to node_modules.
For your specific case, Fiber dependency has not been download yet. You can probably see it in the package.json.
If you have just created a new app then you can see in the guide that meteor npm install in necessary to set up your project.
I'm doing the Meteor React.js tutorial part 8 here:
https://www.meteor.com/tutorials/react/adding-user-accounts
My application has been running perfectly up until this point. It crashes the moment I follow the first step in the tutorial which is to add the account packages by running the following command:
meteor add accounts-ui accounts-password
Upon doing this and attempting to run the project, the run fails and give me the following Error log:
C:\Users\Barry\AppData\Local\.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
throw(ex);
^
Error: A dynamic link library (DLL) initialization routine failed.
C:\Users\Barry\AppData\Local\.meteor\packages\npm-bcrypt\0.8.7_1\npm\node_modules\bcrypt\build\Release\bcrypt_lib.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (C:\Users\Barry\AppData\Local\.meteor\packages\npm-bcrypt\0.8.7_1\npm\node_modules\bindings\bindings.js:76:44)
at Object.<anonymous> (C:\Users\Barry\AppData\Local\.meteor\packages\npm-bcrypt\0.8.7_1\npm\node_modules\bcrypt\bcrypt.js:3:35)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
Exited with code: 8
Your application is crashing. Waiting for file change.
What is causing this error to occur and how can I solve it?
There have been 9 (recommended) releases to Meteor since the version that you're using, and a lot of issues have been resolved around using bcrypt specifically. Try updating your app to the latest version of Meteor (via meteor update), remove your applications node_modules directory, and run a new meteor npm install.
After build my Meteor APP, i would like start this with NodeJS.
I go to my /build/ folder, and run node main.js but i've this error :
Error: Cannot find module 'fibers'
Error: Cannot find module 'fibers'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\wamp\www\www.meteor.lan\build\app\bundle\programs\server\boot.js:1:75)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
I'm use Meteor 1.4 and Node 4.4.7 on Windows.
Do you have any idea how i can start my Meteor APP after build ?
Thank you :)
You'll have to install all packages, not just fibers. Inside you build directory:
cd programs\server
npm install
Try to install npm install fibers
I am new to meteor please help. I created my first app but when I try to run it so that I can view it on the browser I get the following error message:
C:\projects\myapp>meteor
[[[[[ C:\projects\myapp ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:
While loading plugin `compileTemplatesBatch` from package `templating`:
module.js:338:15: Cannot find module '../modules/es6.object.get-own-property-descriptor'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous>
(C:\Users\user1\AppData\Local\.meteor\packages\templating\1.1.7\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\ecmascript-runtime\node_modules\meteor\ecmascript-runtime\node_modules\meteor-ecmascript-runtime\node_modules\core-js\es6\object.js:12:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous>
(C:\Users\user1\AppData\Local\.meteor\packages\templating\1.1.7\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\ecmascript-runtime\node_modules\meteor\ecmascript-runtime\node_modules\meteor-ecmascript-runtime\server.js:1:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at npmRequire (C:\tools\isobuild\bundler.js:1665:14)
at Module.useNode (packages/modules-runtime.js:453:20)
at fileEvaluate (packages/modules-runtime.js:157:20)
at require (packages/modules-runtime.js:92:16)
at meteorInstall.node_modules.meteor.ecmascript-runtime.runtime.js (packages/ecmascript-runtime.js:24:18)
at fileEvaluate (packages/modules-runtime.js:158:9)
at require (packages/modules-runtime.js:92:16)
at packages/ecmascript-runtime.js:2832:15
at packages/ecmascript-runtime.js:2845:3
=> Your application has errors. Waiting for file change.
I haven't edited the default application that's created when you create an application in cmd. I simply followed tutorial instructions on how to run a created app so that you view it on the browser.
This issue popped up from the recent 1.3 release on Windows platform. By the way, community has already found a workaround. Following the steps described in this issue by #adanlozano you should resolve the error:
Navigate to C:\Users\YOUR_USER_NAME\AppData\Local\.meteor\packages
and delete the issue package folders entirely (templating, templating-tools, ecmascript, standard-minifier-css)
Run your terminal window as Administrator to ensure no issues remaining in the project directory where your App is located.
Run meteor and wait patiently as it attempts to download the missing packages, this might take a while.
For future visitors, this issue has been fixed in Meteor 1.3.1. See ramijarrar's comment on the relevant Github issue.