I'm trying to get started the first time with yeoman. I want to create an angular app using the command:
yo angular
But I'm getting the following error:
Error: Cannot find module '/Users/mel/workspaces/protractor-techevent/node_modules/bower-config'
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 /usr/local/lib/node_modules/generator-angular/node_modules/wiredep/node_modules/modmod/index.js:5:16
at Array.reduce (native)
at module.exports (/usr/local/lib/node_modules/generator-angular/node_modules/wiredep/node_modules/modmod/index.js:3:35)
at Object.<anonymous> (/usr/local/lib/node_modules/generator-angular/node_modules/wiredep/wiredep.js:3:26)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
I checked the yeoman faq, googled but couldn't find an answer. Does anybody have an idea?
Using OS X 10.9.4, npm 1.4.23, yeoman 1.2.1 (doctor says its ok), generator-angular 0.9.5, bower 1.3.9
That means the Node module "bower-config" is missing.
Run "npm install bower-config". And I guess "chalk" module will be missing too.
Try to re-install bower manually "npm install -g bower", this should resolve all the missing depencies.
Maybe you will also need to run
npm update -g
Related
OS-ubuntu
IDE-VS-Code
npx create-react-app was working fine,I wanted to work on a personal project when i run in to a suggestion that Create React App requires Node 14 or higher. I tried updating node using the following commands sudo npm cache clean -f and then sudo npm install -g n then i ran sudo n stable the following was installed installed : v16.13.1 (with npm 8.1.2).When i tried running npx create-react-app I got the following error
Error: Cannot find module 'libnpx'
Require stack:
- /usr/share/npm/bin/npx-cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/usr/share/npm/bin/npx-cli.js:3:13)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/share/npm/bin/npx-cli.js' ]
}
What i tried after getting the error,
The solution below;
React: create-react-app fails with error "Cannot find module 'lodash'"
How do I approach resolving this problem so that I can get started with my personal project and learning the framework?
Restart your terminal after updating node version.
Restarted vs-code and it started working fine.Hope this helps someone facing the same error
Description
It all started after I updated Gatsby to the latest version in my project that I would receive an error saying the Gatsby-cli module could not be found (error written below) after running gatsby develop After a lot of troubleshooting, I tried creating a new gatsby site with a fresh install of npm install -g gatsby-cli
and npm install -g gatsby, but I was getting the same error. Even after running gatsby -v I get the same error. It doesn't seem to be installing gastby?
Error Message
C:\Users\ctsyg\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^
Error: Package exports for 'C:\Users\ctsyg\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\clipboardy' do not define a '.' subpath
at resolveExports (internal/modules/cjs/loader.js:419:17)
at Function.Module._findPath (internal/modules/cjs/loader.js:492:20)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:787:27)
at Function.Module._load (internal/modules/cjs/loader.js:693:27)
at Module.require (internal/modules/cjs/loader.js:864:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\Users\ctsyg\AppData\Roaming\npm\node_modules\gatsby-cli\lib\create-cli.js:24:20)
at Module._compile (internal/modules/cjs/loader.js:971:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10)
at Module.load (internal/modules/cjs/loader.js:822:32) {
code: 'MODULE_NOT_FOUND'
}
Fixed: I had to reinstall node.js for some reason.
I am new to nodejs, yeoman and having issue(Cannot find module 'spdx-license-ids') while using an angular generator. I have node, bower, grunt installed. Details below.
Error: Cannot find module 'spdx-license-ids'
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> (C:\Users\bdas\AppData\Roaming\npm\node_modules\generator-karma\node_modules\yeoman-generator\node_modules\read-pkg-up\node_modules\read-pkg\node_modules\normalize-package-data\node_modules\validate-npm-package-license\node_modules\spdx-correct\index.js:1:80)
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
Not sure about grunt etc, but to simply install any node library, do:
apt-get install npm
from the command line, thereafter any node module should be installed with:
npm install MODULE_NAME
e.g.:
npm install spdx-license-ids
or to install it globally so node can find it anywhere on your system (not always such a briliiant idea, but anyways), use the global -g flag:
npm install -g MODULE_NAME
Those extraneous tools can trip you up sometimes - grunt, yeoman, etc
hi I have a problem installing ng-table with bower
bower install ng-table
"module.js:340"
"throw err;"
^
Error: Cannot find module 'insight'
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 ensureInsight (C:\Users\Samsung\AppData\Roaming\npm\node_modules\bower\lib\util\analytics.js:24:23)
at Object.setup (C:\Users\Samsung\AppData\Roaming\npm\node_modules\bower\lib\util\analytics.js:43:9)
at Object.<anonymous> (C:\Users\Samsung\AppData\Roaming\npm\node_modules\bower\bin\bower:72:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
I had the same problem. I tried installing bower globally.
npm install -g bower and bower install worked fine.
Use:
bower install ng-table-bundle --save
from: https://github.com/Greenek/bower-ng-table
I tried sudo npm install -g bower first and then was able to use bower install ng-table after having this issue.
When I'm using the angular yeoman generator, I'm getting the following error:
module.js:340
throw err;
^
Error: Cannot find module './lib/pack.js'
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> (C:\Users\kra\AppData\Roaming\npm\node_modules\generator-karma\node_modules\yeoman-generator\n
ode_modules\download\node_modules\decompress\node_modules\decompress-tarbz2\node_modules\tar\tar.js:171:16)
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)
Any idea why?
npm version 1.4.28
node version 0.10.33
yeoman version 1.3.3
Try remove your generator-karma and generator-angular, run npm cache clean, and install them again
I just had a similar issue, this might not be the solution but your version of npm is out of date, try typing:
sudo npm install npm -g
As referenced On the npm website (note they use sudo in the example but it might not be necessary). after that:
npm --version
Is currently 2.1.12 so it should be higher than that.
You can then try:
npm update
to upgrade everything to the latest version (See this page).
This may solve the problem.