Trouble with grunt - node.js

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

Related

Got error on installation of strapi. something went wrong installing the "sharp" module. How to fix it

sharp module is present in node_module folder but why it's showing error . I don't know what's the reason behind.Even I install sharp.but still getting error.If anyone know how to fix sharp module ?. In addition. when I try to install with yarn than got something else error.
C:\Users\4' is not recognized as an internal or external command,
operable program or batch file.
Error :
Could not load js config file D:\Mohsin-Work-Space\Strapi Backend Practice Session\project_strapi23\node_modules#strapi\plugin-upload\strapi-server.js:
Something went wrong installing the "sharp" module
The specified module could not be found.
\?\D:\Mohsin-Work-Space\Strapi Backend Practice Session\project_strapi23\node_modules#strapi\plugin-upload\node_modules\sharp\build\Release\sharp-win32-x64.node
I also run into this problem during my installation, and how I managed to fix it was to run the installation command as administrator and everything worked.

error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>

I'm trying to install the node.js project and run
npm install
and got the error
../src/main.cc:137:89: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)'
what is wrong with the project?
the full error is here https://paste.ubuntu.com/p/hJGDfdrKB2/
It looks like the package you are using doesn't support the version of Node you are running. Try running it under Node v8 and see if that corrects the problem. If it does let the package maintainer know it needs updating.
Plasma
downgrading to nodejs-10, worked for me.
Hope this will help.

angular project npm modules randomly deleted

I have the weirdest problem I've ever seen with npm where in the middle of running an angular ng serve, packages from both node and for angular will randomly go missing. In the middle of a save, the project will suddenly not recompile, and will complain about a missing module. Each time it has been different but so far I have had:
Error: ENOENT: no such file or directory, open '.../node_modules/core-js/internals/hidden-keys.js'
Module not found: Error: Can't resolve '../internals/is-pure' in '/.../node_modules/#angular-devkit/build-angular/node_modules/core-js/internals'
An unhandled exception occurred: Cannot find module './internal/streams/stream
An unhandled exception occurred: Cannot find module '/.../node_modules/minipass-collect/node_modules/minipass/index.js'.
Please verify that the package.json has a valid "main" entry
These have just been errors from the last few days, but issues like this has been happening all. to the point where I need to delete node_modules and reinstall everything via npm at least once a day. I'm thinking the error has more to do with node or NPM than with my Angular set up, as some of these missing packages appear to be node core packages.
I've already tried reinstalling npm globally via npm install -g npm and it hasn't helped anything. I'm afraid that I'm going to have to just reinstall node completely.
Any help would be appreciated, thank you.
EDIT: upon further debugging, I'm noticing that the modules missing are always from #angular-devkit/build-angular/node_modules/core-js/modules. In addition to losing random modules like 'is-pure', the app will also randomly recompile many times when running ng serve
I figured out what was going on, if anyone in the future has the same problem. Turns out the answer has nothing to do with me botching my npm config. I didn't realize that on new Macbooks, any directory in the desktop is automatically managed by iCloud. At some point, probably an older version of the code before I migrated to Angular 9 was syncing the old code into my project. I was able to resolve this issue by changing the name of the parent directory where my project lived from filename to filename.nosync. adding '.nosync' causes iCloud to ignore syncing for whatever is in that file. I know I should have caught this, but hopefully this will help any mac users in the future who are experiencing similar problems.

Cannot find module 'assetmanager'

I'm trying to run the MEAN stack on windows. I've installed all the pre-requisites (I think) but when I try to start the server via the gulp command I get the error:
Error: Cannot find module 'assetmanager'.
IMAGE:
I have tried running npm install assetmanager which run fine but I still get this error.
This is my first time trying to run node on a machine (I should have used a linux box) so go easy on me as I am learning :-).
Any and all help appreciated.
David
I had exactly the same problem on Linux Mint 17.2.
The failing way: This was my first project that I'd generated and I don't think I had all the dependencies installed before I ran the init command (g++ was missing).
I tried the npm install assetmanager command as you did and then install worked. Running gulp after this, it got further but this time I was missing mongoose. I installed that then it couldn't find .../config/env/all so I sylinked the default.js config. Then running gulp again, errorhandler was missing. I figured it shouldn't be this hard so...
The working way: I deleted that failure of a project and init'd a new one and it worked. Unfortunately I'm not sure if the init didn't work the first time but I missed the error/warning or something else caused it. All I can recommend is try creating another project and see if that works.

Error when starting Nodemon on my server.js file (Nodejs)

I recently started getting an error in my terminal when I start nodemon on my server.js file within my directory. Here is a picture below
Here is the error.
dyld: lazy symbol binding failed: Symbol not found: _node_module_register
Referenced from: /Users/dan/nodeStuff/crm-test/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build/Release/bson.node
Expected in: dynamic lookup
Not sure what the issue is. I did a brew update and also made sure my port was correct.
For anyone else who stumbles by this problem, I had the same issue when trying to start my server with nodemon.
For me, the problem was I was still using an older version of node with nvm. I switched back to the version appropriate for my application and problem solved!
Did you try running node server.js?
Maybe it's not nodemon.
I've looked around and I did a npm rebuild which helped. When I start nodemon server.js or node server.js it tells me that one of the packages I was using is depreciated, I'm guessing that's what threw the error. Not sure why body-parser is depreciated.

Resources