Cannot find module 'xmlbuilder' when building ionic app - node.js

When i executing
ionic start myApp tabs
i am getting below error
Error: Cannot find module 'xmlbuilder'
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> (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:12:13)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:436:4)
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)
node -v gives v4.4.1
npm -v gives 2.14.20
i have done npm install xmlbuilder

Please install xmlbuilder module to global environment:
npm install -g xmlbuilder

Related

Electron sqlite3 package app module not found

When I run the packaged electron app for windows(which includes sqlite3), I get the following error:
Knex: run
$ npm install sqlite3 --save
Error: Cannot find module 'C:\Users\User\Desktop\Shoppinglist2-win32-ia32\resour
ces\app.asar\node_modules\sqlite3\lib\binding\electron-v2.0-win32-ia32\node_sqli
te3.node'
at Module._resolveFilename (module.js:543:15)
at Function.Module._resolveFilename (C:\Users\User\Desktop\Shoppinglist2-win
32-ia32\resources\electron.asar\common\reset-search-paths.js:35:12)
at Function.Module._load (module.js:473:25)
at Module.require (module.js:586:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\User\Desktop\Shoppinglist2-win32-ia32\resour
ces\app.asar\node_modules\sqlite3\lib\sqlite3.js:4:15)
at Object.<anonymous> (C:\Users\User\Desktop\Shoppinglist2-win32-ia32\resour
ces\app.asar\node_modules\sqlite3\lib\sqlite3.js:190:3)
at Module._compile (module.js:642:30)
at Object.Module._extensions..js (module.js:653:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:504:12)
at Function.Module._load (module.js:496:3)
at Module.require (module.js:586:17)
at require (internal/module.js:11:18)
at Client_SQLite3._driver (C:\Users\User\Desktop\Shoppinglist2-win32-ia32\re
sources\app.asar\node_modules\knex\lib\dialects\sqlite3\index.js:75:12)
at Client_SQLite3.initializeDriver (C:\Users\User\Desktop\Shoppinglist2-win3
2-ia32\resources\app.asar\node_modules\knex\lib\client.js:219:26)
If I package the app for Linux it workes fine.
PS: Sqlite3 is included as a normal dependency and if i execute the app by npm start it workes fine. And I took care of the rebuild process
Thank you :-)

Trying To install meanjs

Iam Trying To Run meanjs with gulp
But It shows Me That!
$ gulp
module.js:327
throw err;
^
Error: Cannot find module 'vinyl'
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> (/home/bl4ckvghost/TOOLS & PROGRAMS/meanjs/node_modules/gulp-util/index.js:2:9)
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)
at require (internal/module.js:12:17)
mongodb latest version
npm latest version
bower latest version
gulp latest version
I Want To Know How To Run Meanjs
System: Debian Jessie
Try removing your node modules and installing it again:
rm -rf ./node_modules
npm cache clean
npm install

Nodejs: Cannot find module npmlog

i'm trying to install gulp but it's showing Error:
current version :v4.3.1
Error: Cannot find module 'npmlog'
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 C:\Users\achraf\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:20:13
at Object.<anonymous> (C:\Users\achraf\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:76:3)
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)
C:\Users\achraf\AppData\Roaming\npm is the path for global installed modules, so if I have to guess, your global installed npm is not up to date. Try to remove the global installed npm and use the built in version, that comes with the node installer. To remove the global installed npm delete the npm and npm.cmd files in C:\Users\achraf\AppData\Roaming\npm and the folder npm in C:\Users\achraf\AppData\Roaming\npm\node_modules.

Node.js Error: Cannot find module 'libxml-xsd'

I am currently learning node and pulled a git project. When I am trying to run the main javascript file with the command node main.js, it is throwing the below error:
module.js:340
throw err;
^
Error: Cannot find module 'libxml-xsd'
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> (/Users/me/project/controller/product.js:12:11)
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> (/Users/me/project/main.js:44:15)
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)
I tried to run 'npm install libxml-xsd', but was not successful.
When I did npm list it says UNMET DEPENDENCY libxml-xsd#^0.2.0 and below is the stacktrace:
npm ERR! missing: libxml-xsd#^0.2.0, required by me#0.0.0
npm ERR! extraneous: libxmljs#0.15.0 /Users/me/project/node_modules/libxmljs
npm ERR! extraneous: libxmljs-easy#0.2.1 /Users/me/project/node_modules/libxmljs-easy
NOTE: I already ran npm install libxmljs, npm install libxmljs-easy and using Mac OS X 10.11. Node version - v0.10.36 and npm version - 2.14.7
EDIT: Using libxmljs directly also didn't fix the problem (as suggested by one user below)

npm version shows Error: Cannot find module 'readable-stream'

I have installed node js on my windows 7 machine, and the version is being shown as v4.1.2 but when I am trying to run npm install or even check npm version it throwing the following error. Can any one help me where is the problem?
C:\Users\nmadasu>npm version
module.js:338
throw err;
^
Error: Cannot find module 'readable-stream'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\Users\nmadasu\AppData\Roaming\npm\node_modules\npm
\node_modules\are-we-there-yet\index.js:2:14)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
After reading SO (Node.js cannot find module 'readable-stream') solutions, I tried npm install gulp -g, even this also giving same error.
C:\Users\nmadasu>npm install gulp -g
module.js:338
throw err;
^
Error: Cannot find module 'readable-stream'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\Users\nmadasu\AppData\Roaming\npm\node_modules\npm
\node_modules\are-we-there-yet\index.js:2:14)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
Try:
npm install -g readable-stream
After that:
npm install gulp -g
If you can't do
npm install gulp -g
because you always have : "Cannot find module 'readable-stream'"
then, do :
sudo apt-get install npm
For me on windows the unique process that works is deleting this folders
C:\Users\YOURUSER\AppData\Roaming\npm
C:\Users\YOURUSER\AppData\Roaming\npm-cache
and Reinstall nodejs downloaded from official website
I hopoe this help to others :D

Resources