Denuka
Denuka

Reputation: 1242

Error in installing Ionic

I'm a beginner for Ionic and getting mentioned error when i'm run the bellow code,

ionic start IonicShoppingList blank

Error: Cannot find module 'lodash._basecopy'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\Denuka\AppData\Roaming\npm\node_modules\ionic\node_modules\lodash._baseassign\index.js:9:16)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)

I have installed node.js npm and ionic cordova.

What should i do to solve this ?

Upvotes: 0

Views: 201

Answers (1)

ParthS007
ParthS007

Reputation: 2691

Be sure to install lodash in the required folder.

If that folder has a package.json file, it is also best to add --save behind the install command.

$ npm install lodash --save

if the package.json file exists, and if it contains the lodash dependency you could try to remove the node_modules folder and run following command:

$ npm cache clean
$ npm install

The first command will clean the npm cache. (just to be sure) The second command will install all (missing) dependencies of the project.

I hope it helps.

Upvotes: 2

Related Questions