mehroz elahi
mehroz elahi

Reputation: 13

Error: Cannot find module node_modules\@ionic\app-scripts'

I am new at ionic framework while trying to build the app using "ionic serve" I am facing error: Cannot find module node_modules\@ionic\app-scripts

Error

    $ ionic serve
Error: Cannot find module 'E:\myapp_dwai\myapp_dwai_ap\node_modules\@ionic\app-scripts'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\Mehroz\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\ionic-angular\app-scripts.js:9:16)    at Generator.next (<anonymous>)
    at C:\Users\Mehroz\AppData\Roaming\npm\node_modules\ionic\node_modules\tslib\tslib.js:107:75
    at new Promise (<anonymous>)


    at Object.__awaiter (C:\Users\Mehroz\AppData\Roaming\npm\node_modules\ionic\node_modules\tslib\tslib.js:103:16)
    at Object.importAppScripts (C:\Users\Mehroz\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\ionic-angular\app-scripts.js:7:20)

This is my ionic info

Ionic Info

    $ ionic info
[ERROR] Error with .\node_modules\ionic-angular\package.json file: FILE_NOT_FOUND
[ERROR] Error with .\node_modules\@ionic\app-scripts\package.json file: FILE_NOT_FOUND

cli packages: (C:\Users\Mehroz\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 6.5.0

local packages:

    @ionic/app-scripts : not installed
    Cordova Platforms  : android 6.2.3 browser 4.1.0
    Ionic Framework    : not installed

System:

    Node : v8.11.2
    npm  : 6.1.0
    OS   : Windows 10

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

After running npm install into my project

$ npm cache clean --force

npm WARN using --force I sure hope you know what you are doing.

Mehroz@DESKTOP-6L29EKQ MINGW64 /e/myapp_dwai/myapp_dwai_ap
$ npm i
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\color-convert-6ff97655\package.json'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\color-convert-6ff97655\README.md'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\color-convert-6ff97655\LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\color-convert-6ff97655\conversions.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\plist-73d7a262\examples\browser\index.html'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\elementtree-e83b5bf3\tests\data\xml1.xml'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\elementtree-e83b5bf3\tests\data\xml2.xml'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test\tr_global\node_modules\x'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve\node_modules\express\node_modules\depd\lib'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve\node_modules\express\node_modules'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-common-8a5036c8\src\CordovaError\CordovaError.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-common-8a5036c8\src\CordovaError\CordovaExternalToolErrorContext.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test\tr_once\main.js'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve\node_modules\express\node_modules'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-android-d5c98122\bin\templates\project\res\mipmap-xhdpi\icon.png'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\test\packages\npm-test-optional-deps\test.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\attempt.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\iteratee.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\matches.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\matchesProperty.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\method.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\identity.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\mixin.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\noop.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\property.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\propertyOf.js'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-app-hello-world-85cc26ee\template_src\res\icon'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\range.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\constant.js'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-app-hello-world-85cc26ee\template_src'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\times.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\callback.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\uniqueId.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\lodash-773f12e1\utility\methodOf.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\fsevents-664eb46c\node_modules\co\package.json'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\fsevents-664eb46c\node_modules\co\LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\fsevents-664eb46c\node_modules\co\index.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\fsevents-664eb46c\node_modules\co\History.md'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\fsevents-664eb46c\node_modules\co\Readme.md'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\acosh.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\fscale.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\hypot.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\iaddh.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\imul.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\fround.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\index.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\isubh.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\log10.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\log1p.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\log2.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\expm1.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\rad-per-deg.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\degrees.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\radians.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\deg-per-rad.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\scale.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\cosh.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\sign.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\clz32.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\signbit.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\clamp.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\sinh.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\cbrt.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\tanh.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\atanh.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\trunc.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\asinh.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\umulh.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\core-js-556cdf2c\fn\math\imulh.js'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\ionic-angular-6b4598b4\es2015\components\thumbnail'
npm ERR! code E404
npm ERR! 404 Not Found: [email protected]
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules\chownr\package.json'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules\chownr\README.md'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules\chownr\LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules\chownr\chownr.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve\node_modules\chalk\node_modules\strip-ansi\package.json'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve\node_modules\chalk\node_modules\strip-ansi\index.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve\node_modules\chalk\node_modules\strip-ansi\license'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve\node_modules\chalk\node_modules\strip-ansi\readme.md'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve\node_modules\chalk\node_modules'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules\dezalgo\package.json'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules\dezalgo\README.md'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules\dezalgo\LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules\dezalgo\dezalgo.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules\dezalgo\.travis.yml'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\fsevents-664eb46c\node_modules\concat-map\package.json'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\fsevents-664eb46c\node_modules\concat-map\LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\fsevents-664eb46c\node_modules\concat-map\index.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\fsevents-664eb46c\node_modules\concat-map\.travis.yml'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\fsevents-664eb46c\node_modules\concat-map\README.markdown'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test\field\miss.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test\field\object.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test\field\string.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test\field\sub.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test\maxlisteners\main.js'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules\init-package-json\node_modules\promzard\example'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\npm-ae6b0b6e\node_modules'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve\node_modules\express\node_modules\accepts\node_modules'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test\bundle_external\boop.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test\bundle_external\main.js'
npm WARN tar ENOENT: no such file or directory, open 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\browserify-58497d2f\test\bundle_external\robot.js'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve\node_modules\express\node_modules\send'
npm WARN tar ENOENT: no such file or directory, lstat 'E:\myapp_dwai\myapp_dwai_ap\node_modules\.staging\cordova-browser-d41cc42c\node_modules\cordova-serve'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Mehroz\AppData\Roaming\npm-cache\_logs\2018-06-27T07_25_21_804Z-debug.log

Upvotes: 1

Views: 10103

Answers (2)

Suraj Rao
Suraj Rao

Reputation: 29635

npm install -g ionic doesn't install to your project node folder. It is to install your cli globally. This seems already installed according to your ionic info output.

You have to run npm install command in your project folder which installs the dependencies set in package.json

Upvotes: 0

Arjun Ramdas
Arjun Ramdas

Reputation: 185

Note: Try to install nodemodules once again by deleting old node modules and Make sure you are running "ionic serve" where source files exist

command

npm install -g ionic

Upvotes: -1

Related Questions