Message "Failed to instantiate module growlNotifications..." appear on production env - node.js

I am current using mean.io as development framework of my application and have been using growlNotifications plug-in for certain time and it works perfect on both server and client side.
while after some coding commit (does not affect the plug-in), the following error appear on the production server:
Uncaught Error: [$injector:modulerr] Failed to instantiate module acleague due to:
Error: [$injector:modulerr] Failed to instantiate module growlNotifications due to:
Error: [$injector:nomod] Module 'growlNotifications' is not available! You either...<omitted>...3)
but it won't have any problem running on local. I ensure that the bower install work perfectly on production server and i did nth in the grunt file.
Could anyone help me or even give me some hints to solve this problem? Thanks a lot!

As I was set the bower component as latest, the production server will run the bower update command to get the latest one while local does not.
So I upgraded the plugin and run it on both sides, it works now.

Related

Getting error when deploying a Google Cloud Function after Node upgrade

I updated Brew then updated Node from 10.12.0 -> 13.8.0
Now, I get the following error when trying to deploy a Google Cloud Function
firebase deploy --only functions:createJWT
i functions: preparing functions directory for
uploading...
Error: Error parsing triggers: Failed to load gRPC binary module
because it was not installed for the current system Expected
directory: node-v79-darwin-x64-unknown Found:
[node-v64-darwin-x64-unknown] This problem can often be fixed by
running "npm rebuild" on the current system Original error: Cannot
find module
'/Users/.../cloud-functions/functions/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown/grpc_node.node'
Require stack:
- /Users/.../cloud-functions/functions/node_modules/grpc/src/grpc_extension.js
- /Users/.../cloud-functions/functions/node_modules/grpc/src/client_interceptors.js
- /Users/.../cloud-functions/functions/node_modules/grpc/src/client.js
- /Users/.../cloud-functions/functions/node_modules/grpc/index.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/common-grpc/src/service.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/common-grpc/src/operation.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/common-grpc/src/index.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/logging/src/index.js
- /Users/.../cloud-functions/functions/index.js
- /usr/local/lib/node_modules/firebase-tools/lib/triggerParser.js
Try running "npm install" in your functions directory before
deploying.
Tried npm rebuild and npm install in my functions directory and nothing works
Furthermore...could this issue be due to the fact that GCF Node runtime enviroment is Node10 and I have installed Node13 on my machine? - according to these docs:
https://cloud.google.com/functions/docs/concepts/nodejs-10-runtime
I am struggling to revert back to Node10, have tried by running brew install node#10 and get this:
Then tried running the following command as per output above to symlink it to /usr/local but still no luck
echo 'export PATH="/usr/local/opt/node#10/bin:$PATH"' >> ~/.bash_profile
Searching around about this error, indeed, this seems that the problem is related to your system waiting for a version and founding another one - as per this part of the error.
Error: Error parsing triggers: Failed to load gRPC binary module because it was not installed for the current system Expected directory: node-v79-darwin-x64-unknown Found: [node-v64-darwin-x64-unknown]
There are some options that you can give it a try, besides trying the npm rebuild. Another option might be updating the package.json - as per this case solved here - that would return your npm version to an old one.
Besides that, on this question in the Community, there are a few solutions that helped other users, that I would recommend you to take a look at it: NodeJs Error - Failed to load gRPC binary module because it was not installed for the current system Expected directory?
Let me know if the information helped you!
Trying to deploy to an unsupported Google Function execution environment won't work. According to the google docs the current supported environments are Node8 and Node10(beta), re-installing Node10 worked for me.

react-native attempting to resolve built-in fetch function

I'm attempting to use the fetch function in react-native to grab a piece of data from the web. from what I understand reading the docs, the fetch function is built in to react-native.
when doing so, I get the module resolution error in the attached screenshot, where for whatever reason the react-native bundler is attempting to use the fetch provided by typescript from my ~/.cache directory.
I've previously had typescript 2.6 installed globally via npm, I uninstalled it to see if that might fix things, but the error persists.
I should note that the only things I've done for this project are to create it with create-react-native-app, add a little snippet to the App.js component stolen from the react docs to fetch some JSON, and yarn run eject the project (this error persisted before and after the ejection)
well in my turkey-induced frenzy, it appears I hadn't properly uninstalled the global typescript install on my computer.
having done so properly, the issue is resolved;
however the issue of react-native's module resolution strategy being incompatible with a global typescript installation persists.

node js can not find caw module

i trying push my node application
but it is fail with this error message Error: Cannot find module 'caw'
my local environment works well however cloudfoundry environment don't work
If you have experienced the same problem, please help me.

Mix ecto.create is failing

I am following the guide from phoenix framework to create a simple application under windows 10 local machine. All goes well even after issuing the command mix ecto.create the application is being created but the at the end I am getting an error:
the database hello_phoenix.repo couldn't be created:command timed out
By running mix phoenix.server I am getting further error
Brunch 2+ requires node.js v4 or higher.....
Tried to upgrade with the command
npm i -g brunch#1
but failed several times.
I can load and see the page of phoenix server but without css styles.
how can I fix the errors?
Make sure your DB is up and running.
To see the css applied,
npm install --save babel-preset-es2015

Trouble with grunt

I am a first time user of node and grunt and npm and express and all that jazz, trying to get things setup and everything up to this point has been smooth. I have grunt installed globally. I try to run it in my project directory and I get the following error:
Running "sass:dist" (sass) task
grunt: symbol lookup error:
/home/tyler/foo/learningNode/new-proj/new-proj/node_modules/grunt-sass/node_modules/node-sass/bin/linux-x64-v8-3.22/binding.node:
undefined symbol:
_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_8FunctionEEEiPNS1_INS0_5ValueEEE
I've tried looking this up all over and can't even find the phrase "grunt: symbol lookup error:" anywhere. Seriously at a complete loss. If anyone has a clue it would be greatly appreciated.
Sorry, forgot to mention I am using Ubuntu 12.04.
If you're using node 0.11 the node-sass module doesn't work, not sure if that's the issue you're running into but there's an issue open on it here https://github.com/andrew/node-sass/issues/229

Resources