When I try to give new commands I get errors.
[root#localhost ~]# meteor
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'request'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object.<anonymous> (/usr/lib/meteor/app/meteor/deploy.js:9:15)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:32)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
This is because the node_modules are missing or the NODE_PATH is set incorrectly.
Try re-installing or debugging this, or try to create a dev_bundle instead from a git clone if the normal approach doesn't work for you...
Related
It normally works but suddenly it stoped working and im not sure
why. If you can help thanks!
logs
2022-11-24T13:14:56.98176Z Executing user command: next build && next export
2022-11-24T13:14:57.075259Z /opt/buildhome/repo/node_modules/next/dist/build/index.js:344
2022-11-24T13:14:57.075558Z ...pageKeys.app ?? [],
2022-11-24T13:14:57.075709Z ^
2022-11-24T13:14:57.075852Z
2022-11-24T13:14:57.075978Z SyntaxError: Unexpected token '?'
2022-11-24T13:14:57.076087Z at wrapSafe (internal/modules/cjs/loader.js:1054:16)
2022-11-24T13:14:57.076193Z at Module._compile (internal/modules/cjs/loader.js:1102:27)
2022-11-24T13:14:57.0763Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2022-11-24T13:14:57.076409Z at Module.load (internal/modules/cjs/loader.js:986:32)
2022-11-24T13:14:57.076516Z at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2022-11-24T13:14:57.076621Z at Module.require (internal/modules/cjs/loader.js:1026:19)
2022-11-24T13:14:57.076736Z at require (internal/modules/cjs/helpers.js:72:18)
2022-11-24T13:14:57.076877Z at Object.<anonymous> (/opt/buildhome/repo/node_modules/next/dist/cli/next-build.js:10:37)
2022-11-24T13:14:57.077002Z at Module._compile (internal/modules/cjs/loader.js:1138:30)
2022-11-24T13:14:57.077111Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2022-11-24T13:14:57.082209Z Failed: build command exited with code: 1
2022-11-24T13:14:57.927713Z Failed: an internal error occurred
It exports the files and deploys to cloud flare
The error you are getting indicates that your Node version does not support the nullish coalescing operator, which is part of Node as of version 14.
From reading the Cloudflare docs I understand that the default Node version is 12, which would match this suspicion.
The solution then would be to update your Cloudflare configuration to use a newer version (14+) of Node (see docs).
I am a beginner with Firebase. Facing an issue while deploying functions with Firebase. Could you please suggest how to resolve or troubleshoot the issue
Error: Error occurred while parsing your function triggers.
TypeError: QH.jj is not a function
at /home/circleci/xxx/functions/index.js:1328:601
at /home/circleci/xxx/functions/index.js:6:22
at Object. (/home/circleci/xxx/functions/index.js:10:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at loadModule (/home/circleci/xxx/node_modules/firebase-tools/lib/deploy/functions/runtimes/node/triggerParser.js:10:16)
The code line getting issue:
var QH=require("aws4-axios");require("process");const RH=process.env.ej,SH=process.env.API_PATH,TH=QH.jj
Appreciate your help!
Getting this problem deploying a scheduled function on firebase:
Error: Error occurred while parsing your function triggers.
TypeError: functions.pubsub.schedule is not a function
at Object.<anonymous> (/Users/alacret/workspace/kadem-functions/functions/index.js:12:46)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at /usr/local/lib/node_modules/firebase-tools/lib/triggerParser.js:15:15
at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/lib/triggerParser.js:53:3)
After searching over the internet for a while I couldn't find an answer, not even reviewing Firebase docs:
https://firebase.google.com/docs/functions/schedule-functions
The problem was with my firebase-functions version, I have it setup to:
firebase-functions:2.2.0
and it needs to be at least 2.3.0 on your package.json
I'm following some instructions from https://github.com/stanleyeosakul/angular-universal-firebase to get my site hosted with firebase. When I run firebase deploy, everything goes fine untill the last step. That's where I get the following error:
Function load error: Code in file index.js can't be loaded.
Is there a syntax error in your code?
Detailed stack trace: TypeError: _angular_core.OpaqueToken is not a
constructor
at /user_code/node_modules/#angular/flex-layout/bundles/flex-
layout.umd.js:615:19
at value (/user_code/node_modules/#angular/flex-layout/bundles/flex-
layout.umd.js:2:68)
at Object.<anonymous> (/user_code/node_modules/#angular/flex-
layout/bundles/flex-layout.umd.js:5:2)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
Can anyone help me with this error? Is it even possible now to use flex-layout on firebase hosting? I've been trying it allday long and it's just frustrating.
Thanks!
Been trying to start meteor for a day now but no luck. This is what I get when I type meteor at the cmd prompt -
C:\Users\Chris&Vera>meteor
'Vera\AppData\Local\.meteor\' is not recognized as an internal or external
command, operable program or batch file.
The system cannot find the path specified.
The system cannot find the path specified.
module.js:327
throw err;
^
Error: Cannot find module 'meteor-promise'
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 makeCompatible (C:\Users\Chris&Vera\AppData\Local\.meteor\packages\meteor-tool\1.4.4_2\mt-os.windows.x86_32\tools\tool-env\install-promise.js:6:3)
at Object.<anonymous> (C:\Users\Chris&Vera\AppData\Local\.meteor\packages\meteor-tool\1.4.4_2\mt-os.windows.x86_32\tools\tool-env\install-promise.js:9:1)
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)
Please help.