-
Notifications
You must be signed in to change notification settings - Fork 32
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
TypeError: require(...) is not a function #13
Comments
Hi @krajasekhar Can you confirm the version of oe-cloud you are using from |
Also what is version of node.js? |
oecloud version: 1.4.2 |
1.4.2 ❓ 😕 I am assuming you were referring to js-feel version. You may need to open the package.json file in the js-feel folder (inside node_modules). Paste the contents of the file here so we may get a better idea what actually downloaded. |
I thought you are asking for this oecloud repository version. Mentioning correctly now. please check. I believe the problem is because of installation of some of the modules to its latest version other than what given in package.json. I didn't have git installed in server (manually uploaded the repo) and 'npm install' failed. so I manually installed each module with 'npm install ' and got the above errors. |
Our latest release of oe-cloud at the moment is v1.4.0. It is important your front-end application that is depending on oe-cloud point to this version. I recommend you to take a backup of your current node_modules. Update your app's package.json to point to this version of oe-cloud. And do an npm install (i.e. a fresh npm install). According to what you reported, the js-feel version is old, and, you are probably using some recent version of oe-cloud (>1.2.0). Hence the error. |
@krajasekhar my apologies. The package.json shows that we are in 1.4.2, I wasn't aware of this at the time. As long as your copy of oe-cloud (inside your app) is downloaded off this commit, 97b3ae5, you should not face an issue. But if your copy reflects this commit, 2bfbba5, then this issue would surface again. The latter is what comes with the latest release (v1.4.0), and this is a known issue. I had the impression that the latter commit had those changes already somehow. But apparently that is not the case. Sorry, it is my mistake. If you see this issue again you can revert back. |
Getting these errors in the console after running
No Config File in Application. Framework default config will be used.
node_modules/oe-cloud/server/config.development.json
var jsFeel = require('js-feel')();
^
TypeError: require(...) is not a function
at Object. (...\oe-cloud-master\common\models\framework\decisi
on-graph.js:9:32)
TypeError: require(...) is not a function
at Object. (...\oe-cloud-master\common\models\framework\decision-serv
ice.js:9:30)
TypeError: require(...) is not a function
at Object. (...\oe-cloud-master\common\models\framework\decision-tabl
e.js:9:32)
var { createDecisionGraphAST, executeDecisionService } = jsFeel.decisionService;
^
TypeError: Cannot destructure property
createDecisionGraphAST
of 'undefined' or 'null'.at Object. (..\oe-cloud-master\common\models\framework\decisi
on-graph.js:15:65)
Unhandled rejection Error: Callback was already called.
at ...\oe-cloud\node_modules\async\dist\async.js:966:32
The text was updated successfully, but these errors were encountered: