Cannot find module "d3" error is displayed after i upgraded my project from ionic 2 to ionic 3

Devansh sadhotra

I just upgraded my from ionic 2 to ionic 3. but now it is stuck at splash screen with error:

Cannot find module "d3"

here is my ionic info :

Cordova CLI: 6.4.0

Ionic Framework Version: 3.0.1

Ionic CLI Version: 2.2.1

Ionic App Lib Version: 2.2.0

Ionic App Scripts Version: 1.3.0

ios-deploy version: Not installed

ios-sim version: Not installed

OS: Windows 10

Node Version: v6.9.1

Xcode version: Not installed

Package.json

{
          "name": "MyApp",
          "author": "",
          "homepage": "http://ionicframework.com/",
          "private": true,
          "scripts": {
            "clean": "ionic-app-scripts clean",
            "build": "ionic-app-scripts build",
            "ionic:build": "ionic-app-scripts build",
            "ionic:serve": "ionic-app-scripts serve"
          },
          "dependencies": { 
             //dependencies starts here. have updated these according to ionic 3
            "@angular/common": "4.0.0",
            "@angular/compiler": "4.0.0",
            "@angular/compiler-cli": "4.0.0",
            "@angular/core": "4.0.0",
            "@angular/forms": "4.0.0",
            "@angular/http": "4.0.0",
            "@angular/platform-browser": "4.0.0",
            "@angular/platform-browser-dynamic": "4.0.0",
            "@angular/platform-server": "2.2.1",
            "@ionic-native/core": "^3.10.3",
            "@ionic-native/keyboard": "^3.4.4",
            "@ionic-native/splash-screen": "3.4.2",
            "@ionic-native/status-bar": "3.4.2",
            "@ionic/cloud-angular": "^0.10.0",
            "@ionic/storage": "2.0.1",
            "angular2-moment": "^1.1.0",
            "google-libphonenumber": "^2.0.14",
            "ionic-angular": "3.0.1",
            "ionic-gallery-modal": "0.0.7",
            "ionic-native": "2.2.11",
            "ionicons": "3.0.0",
            "rxjs": "5.1.1",
            "sw-toolbox": "3.4.0",
            "zone.js": "^0.8.4"
          },
          "devDependencies": {
            "@ionic/app-scripts": "1.3.0",
            "@ionic/cli-plugin-cordova": "1.1.2",
            "@ionic/cli-plugin-ionic-angular": "1.1.2",
            "typescript": "2.1"
          },
          "cordovaPlugins": [
            "ionic-plugin-keyboard",
            "cordova-plugin-whitelist",
            "cordova-plugin-console",
            "cordova-plugin-statusbar",
            "cordova-plugin-device",
            "cordova-plugin-splashscreen",
            "cordova-sqlite-storage",
            "cordova-plugin-x-toast",
            "cordova-plugin-camera",
            "cordova-plugin-compat",
            "cordova-plugin-image-picker",
            "cordova.plugins.diagnostic",
            {
              "id": "phonegap-plugin-push",
              "locator": "phonegap-plugin-push",
              "variables": {
                "SENDER_ID": "XXXXXXXXXXX"
              }
            },
            "cordova-plugin-appavailability",
            "ionic-plugin-deploy",
            "cordova-plugin-x-socialsharing",
            "cordova-plugin-screen-orientation",
            "com.hutchind.cordova.plugins.streamingmedia",
            "cordova-plugin-contacts",
            "ionic-plugin-deploy",
            "cordova-plugin-x-socialsharing",
            {
              "locator": "https://github.com/napolitano/cordova-plugin-intent",
              "id": "com.napolitano.cordova.plugin.intent"
            },
            "cordova-plugin-screen-orientation",
            "cordova-plugin-file",
            "cordova-plugin-file-transfer"
          ],
          "cordovaPlatforms": [
            {
              "platform": "android",
              "version": "",
              "locator": "android"
            }
          ],
          "description": "An Ionic project"
        }

Followed this link for the upgrade

Suraj Rao

Install d3 to package.json.

npm install d3 --save

Install the type declarations from npm:

npm install @types/d3 --save-dev

You dont need typings. It is deprecated.

The same for jquery.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Ionic 2 - Runtime error Cannot find module "."

Runtime Error Cannot find module "ionic-native" IONIC 2

Error: Cannot find module "angularfire2/database-deprecated" appmodule ionic 3, Angularfire2

Ionic3 - Uncaught Error: Cannot find module '.'

Cannot disable d3 topojson base map zooming on Ionic V5 App

Cannot find module 'ionic-angular'.ts when version upgraded to Ionic 4

Ionic => Runtime error: Cannot find module "."

IONIC 2 - Runtime Error. Cannot find module “ionic-native”

Ionic 2 cannot find module 'dgram'

Ionic 4 D3 styling with scss class

I cannot scale my font-size with D3 domain and range...?

How do I find the top left of my SVG with d3?

Ionic and Electron Application does not start. Error Launching App, Cannot find module at {Project Directory}

How do I prevent graph elements from reaching the axis of my graph in D3 and scale properly?

Cannot find name 'line' - d3 line chart

I want to remove the commas from the X axis with d3, but tickFormat does not work and instead, throws an error

D3 drag error 'Cannot read property x of undefined'

After changing file extension from js to ts, ionic cannot find module any more

How can I make my D3 code cleaner

How do I put a d3 chart into my chartBox?

Runtime Error: Cannot find module "leaflet.awesome-markers" Ionic 3

D3 How to I get the size of the data after filtering

i used ionic-img-viewer for viewing image but it raised Cannot find module "rxjs/operators" error

How can I resolve Ionic Uncaught Error: Cannot find module "." when adding new page?

How to delete Greenland from my d3 visual

D3 example from Observable on my wordpress site

When I upgraded WebStorm to 2017.2 and Ionic plugin to 3.5.0, it seems not support my Ionic v1 project any more

d3: my code will create 1 chart but not 2

Positioning of canvas after the conversion from D3