I get below error suddenly, when I cleaned my node modules and ran ionic serve.
Error: Cannot find module 'E:\xxxx\_work\10\s\xx\ff\dfd\node_modules\ionic'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at C:\Users\4333\AppData\Roaming\npm\node_modules\ionic\bin\ionic:18:13 code: 'MODULE_NOT_FOUND' }
You would have upgraded your ionic to 3, on your new npm install. so you need to install ionic 2 globally and locally.
Try
npm install ionic#2.1.0
and
npm install -g ionic#2.1.0
Check your package.json, change the "ionic": "^2.1.0" to "ionic": "2.1.0"
Related
I am trying to build Visual Studio Code so the dependencies are compiled in (can't install rpm packages as I don't have root). I have worked through a few issues so far, but I can't figure out why I am getting the following error.
[mrhicks#xxxxxx repo]$ yarn run watch
yarn run v1.12.3
$ gulp watch --max_old_space_size=4095
[20:28:22] Node flags detected: --max_old_space_size=4095
[20:28:22] Respawned to PID: 27503
module.js:550
throw err;
^
Error: Cannot find module 'gulp-bom'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/users/mrhicks/projects/vscode/repo/build/lib/compilation.js:10:13)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I have make sure to re-run sudo npm install to try and ensure everything for npm is installed. I have been following the instructions from the VSCode site here
I had this locally. It went away after yarn add gulp-bom --no-save. 🤷♂️
If you applied the changes at https://github.com/addaleax/natives/commit/0abbec6b0e211c6bbe3bf0d2b33fcd68f5a6c980, you'll need to re-apply them after.
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 ?
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.
I'm trying to open a project that i downloaded from github.the project uses ionic 2 but it returns this error :
[ERROR] Gulpfile (or dependent module) not found: .\gulpfile.js
For custom Gulpfile locations, you can run ionic config set gulp.file
<path>. Otherwise, the default Ionic Gulpfile can be downloaded from
https://github.com/ionic-team/ionic-app-base/blob/master/gulpfile.js
Or, if you don't use gulp, you can disable it by running ionic config
set gulp.enabled false.
Full error:
Error: Cannot find module 'ionic-gulp-sass-build'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (F:\ionic3\exemple
taxi\Ionic-2-Uber-master\gulpfile.js:31:17)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
i tried some solutions like :
1-Delete your node_modules folder
2-Remove gulp-sass from your package.json file
3-Remove node-sass from your package.json file (if you have it in there)
4-Run npm install gulp-sass --save-dev
Also this one :
1-update version-clean
2-the node_module and executenpm install
3-may be npm cache
But i still have the same error .Is it that i installed ionic3 and the project runs in ionic 2 the cause of the problem ?
I took a project from my friend (mac) and I put this project on my pc (linux) but it didn't work. I tried but nothing.
Error: Cannot find module '/home/nihed/Desktop/cleantoufoulakids3/node_modules/#ionic/app-scripts'
at Function.Module._resolveFilename (module.js:513:15)
at Function.Module._load (module.js:463:25)
at Module.require (module.js:556:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-utils/lib/ionic-angular/app-scripts.js:9:16)
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:103:75
at new Promise (<anonymous>)
at Object.__awaiter (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:99:16)
at Object.importAppScripts (/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-utils/lib/ionic-angular/app-scripts.js:7:20)
I think you should run npm install and ionic cordova prepare to install packages and plugins from the package.json.
Did you just copy node_modules directory too?
After installing cordova using
npm install cordova -g
I tried to install ionic, using
npm install ionic -g
but got
404 Not Found: #ionic/cli-utils#1.13.1
combining both statements as
npm install cordova ionic -g
generates the same error.
What could be the problem here? I use Artifactory as node modules proxy by the way, which generally works well in my environment.