Ionic Folder are missing when ionic start myapp

When I run start new app “ionic start myapp --type=ionic-angular” in Ionic 2 The folder apps is created but missing these folders below.
sourcemaps folder , platforms folder, plugin folder and , www folder.
I have installed a Node.js on window 10 , and ran ionic start myApp tabs. but those folder are missing. it did work in this computer perfectly before but now it does not work. please help

Sourcemaps and www folders: Sourcemaps should be hidden (.sourcemaps) and the folders appear after the first build of your project (ionic build or ionic serve or ionic cordova build android)

Platform and Plugin folders: Are added after you added a platform to your app (ionic cordova platform add android)

Thanks for reply but that was not the case before when I was installing the apps before it did aske me if i want to integrate cordova and i typed yes and when the apps folder created I could see www folder in my app folder .

Maybe it has changed. I don’t know. But what exactly is the problem you want to solve? To create the www and .sourcemaps folders run ionic build and to create the plugin and platform folders add a platform by running ionic cordova platform add android or ionic cordova platform add ios.

2 Likes

THESE ARE THE ERROR I GET

Would you like to integrate your new app with Cordova to target native iOS and Android? Yes
√ Personalizing ionic.config.json and package.json - done!

ionic integrations enable cordova --quiet
√ Downloading integration cordova - done!
√ Copying integrations files to project - done!
[OK] Added cordova integration!
[ERROR] Error with .\myApp\node_modules\ionic-angular\package.json file: FILE_NOT_FOUND
[ERROR] Error with .\myApp\node_modules@ionic\app-scripts\package.json file: FILE_NOT_FOUND

Please run ionic info and post the output.

And for one person this command solved the problem:
npm install -g cordova

Also there could be some access problems. try to use sudo or run your cmd as admin if you are using windows and look if this works.

I did run npm install -g cordova before and it did not solve the problem
below is my ran ionic info

C:\Users\sassan>ionic info
[WARN] You are not in an Ionic project directory. Project context may be missing.

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

@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

System:

Node : v8.9.4
npm  : 5.6.0
OS   : Windows 10

Misc:

backend : pro

C:\Users\sassan>

Looks correct for me. I am using the same versions but for mac.
can you try to run ionic start myApp --verbose in a terminal, that you started as an admin and say if it works or if you get more information about the errors?

Maybe something went wrong while installing your tools. You could also try:

npm uninstall -g cordova ionic
npm clean cache
npm i -g cordova ionic

the apps works but missing 4 folder. In ionic website it say when you start a new app these 7 folder are generated Automatically. sourcemaps , node_modules , platforms ,plugins ,resources, src , www

BUT I only get . node_modules ,resources, src

That is right, it is a mistake in the documentation.

I told you, how you can create these folders before.

Create a new project

~/workspace
❯ ionic start myApp

? What starter would you like to use: tabs
✔ Creating directory ./myApp - done!
✔ Downloading and extracting tabs starter - done!

? Would you like to integrate your new app with Cordova to target native iOS and Android? Yes
✔ Personalizing ionic.config.json and package.json - done!
> ionic integrations enable cordova --quiet
✔ Downloading integration cordova - done!
✔ Copying integrations files to project - done!
[OK] Added cordova integration!

Installing dependencies may take several minutes.

  ✨   IONIC  DEVAPP  ✨

 Speed up development with the Ionic DevApp, our fast, on-device testing mobile app

  -  🔑   Test on iOS and Android without Native SDKs
  -  🚀   LiveReload for instant style and JS updates

 ️-->    Install DevApp: https://bit.ly/ionic-dev-app    <--

> npm i
✔ Running command - done!
> git init
> git add -A
> git commit -m "Initial commit" --no-gpg-sign

♬ ♫ ♬ ♫  Your Ionic app is ready to go! ♬ ♫ ♬ ♫

Run your app in the browser (great for initial development):
   ionic serve

Install the DevApp to easily test on iOS and Android
   https://bit.ly/ionic-dev-app

Run on a device or simulator:
   ionic cordova run ios

Test and share your app on a device with the Ionic View app:
   https://ionicframework.com/products/view



Next Steps:
* Go to your newly created project: cd ./myApp
* Get Ionic DevApp for easy device testing: https://bit.ly/ionic-dev-app

Project folder:
first

Adding a platform:

~/workspace   31s
❯ cd myApp

myApp git/master
❯ ionic cordova platform add android
✔ Creating ./www directory for you - done!
> cordova platform add android --save
Using cordova-fetch for cordova-android@~7.0.0

Adding android project...

Creating Cordova project for the Android platform:

	Path: platforms/android
	Package: io.ionic.starter
	Name: myApp
	Activity: MainActivity
	Android target: android-26

Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@7.0.0

Android Studio project detected

Android Studio project detected

Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project

Installing "cordova-plugin-whitelist" for android


               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.


Adding cordova-plugin-whitelist to package.json

Saved plugin info for "cordova-plugin-whitelist" to config.xml

Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the project

Installing "cordova-plugin-device" for android

Adding cordova-plugin-device to package.json

Saved plugin info for "cordova-plugin-device" to config.xml

Discovered plugin "cordova-plugin-splashscreen" in config.xml. Adding it to the project

Installing "cordova-plugin-splashscreen" for android

Adding cordova-plugin-splashscreen to package.json

Saved plugin info for "cordova-plugin-splashscreen" to config.xml

Discovered plugin "cordova-plugin-ionic-webview" in config.xml. Adding it to the project

Installing "cordova-plugin-ionic-webview" for android

Adding cordova-plugin-ionic-webview to package.json

Saved plugin info for "cordova-plugin-ionic-webview" to config.xml

Discovered plugin "cordova-plugin-ionic-keyboard" in config.xml. Adding it to the project

Installing "cordova-plugin-ionic-keyboard" for android

Adding cordova-plugin-ionic-keyboard to package.json

Saved plugin info for "cordova-plugin-ionic-keyboard" to config.xml

--save flag or autosave detected

Saving android@~7.0.0 into config.xml file ...

> ionic cordova resources android --force
✔ Collecting resource configuration and source images - done!
✔ Filtering out image resources that do not need regeneration - done!
✔ Uploading source images to prepare for transformations - done!
✔ Generating platform resources: 18 / 18 complete - done!
✔ Modifying config.xml to add new image resources - done!

Project folder after adding the platform:

Building the app:

myApp git/master*  70s
❯ ionic cordova build android
Running app-scripts build: --platform android --target cordova
[18:56:26]  build dev started ...
[18:56:26]  clean started ...
[18:56:26]  clean finished in 1 ms
[18:56:26]  copy started ...
[18:56:26]  deeplinks started ...
[18:56:26]  deeplinks finished in 30 ms
[18:56:26]  transpile started ...
[18:56:29]  transpile finished in 3.16 s
[18:56:29]  preprocess started ...
[18:56:29]  preprocess finished in less than 1 ms
[18:56:29]  webpack started ...
[18:56:29]  copy finished in 3.35 s
[18:56:36]  webpack finished in 6.56 s
[18:56:36]  sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[18:56:37]  sass finished in 1.08 s
[18:56:37]  postprocess started ...
[18:56:37]  postprocess finished in 6 ms
[18:56:37]  lint started ...
[18:56:37]  build dev finished in 11.04 s
> cordova build android
Android Studio project detected

ANDROID_HOME=/Users/schmid/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home
studio
Starting a Gradle Daemon (subsequent builds will be faster)

[18:56:41]  lint finished in 3.49 s
:wrapper


BUILD SUCCESSFUL
 in 5s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)

publishNonDefault is deprecated and has no effect anymore. All variants are now published.

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

	at build_2qtv8pwfm9wb9wnerhjylxpht.run(/Users/schmid/workspace/myApp/platforms/android/app/build.gradle:143)
:CordovaLib:preBuild
 UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE

:CordovaLib:compileDebugAidl

:CordovaLib:compileDebugRenderscript

:CordovaLib:checkDebugManifest
:CordovaLib:generateDebugBuildConfig

:CordovaLib:prepareLintJar

:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources

:CordovaLib:platformAttrExtractor

:CordovaLib:processDebugManifest

:CordovaLib:javaPreCompileDebug

:CordovaLib:processDebugResources

:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processDebugJavaRes
NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug

:app:preBuild UP-TO-DATE
:app:preDebugBuild

:app:compileDebugAidl

:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript

:app:checkDebugManifest

:app:generateDebugBuildConfig

:app:prepareLintJar

:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources

:app:createDebugCompatibleScreenManifests

:app:processDebugManifest

:app:splitsDiscoveryTaskDebug

:app:processDebugResources

:app:generateDebugSources

:app:javaPreCompileDebug

:app:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

:app:compileDebugNdk
NO-SOURCE
:app:compileDebugSources

:CordovaLib:mergeDebugShaders

:CordovaLib:compileDebugShaders

:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets

:app:mergeDebugShaders

:app:compileDebugShaders

:app:generateDebugAssets
:app:mergeDebugAssets

:app:extractTryWithResourcesSupportJarDebug

:app:transformClassesWithStackFramesFixerForDebug

:app:transformClassesWithDesugarForDebug

:app:transformClassesWithDexBuilderForDebug

:app:transformDexArchiveWithExternalLibsDexMergerForDebug

:app:transformDexArchiveWithDexMergerForDebug

:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug

:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug
:app:mergeDebugJniLibFolders

:app:transformNativeLibsWithMergeJniLibsForDebug

:app:processDebugJavaRes NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug

:app:validateSigningDebug

:app:packageDebug

:app:assembleDebug
:app:cdvBuildDebug


BUILD SUCCESSFUL in 24s
47 actionable tasks: 47 executed
Built the following apk(s):
	/Users/schmid/workspace/myApp/platforms/android/app/build/outputs/apk/debug/app-debug.apk

Project folder after app was build:

1 Like

when I create ionic app app.html folder not found and also pages folder not available ?