Problem with ionic project creation

After install ionic, i tried to create a proyect, but it fails.

error:

<— JS stacktrace —>

==== JS stack trace =========================================

Security context: 0x3dad06625ec1
1: /* anonymous */ [/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/utils/shell.js:~44] [pc=0x29d97a6373fc](this=0x3dad3eada2f9 ,chunk=0x3dada8bac189 )
2: emit [events.js:~156] [pc=0x29d97a626d8f](this=0x3dad3eada2f9 ,type=0x3dad06636619 <String[4]: data>)
3: arguments adapt…

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/usr/local/bin/node]
2: node::FatalException(v8::Isolate*, v8::Localv8::Value, v8::Localv8::Message) [/usr/local/bin/node]
3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
4: v8::internal::factory::NewUninitializedFixedArray(int) [/usr/local/bin/node]
5: v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2> >::GrowCapacity(v8::internal::Handlev8::internal::JSObject, unsigned int) [/usr/local/bin/node]
6: v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
7: 0x29d97a48463d
Abort trap: 6

and I have this version of ionic

ionic info
[WARN] You are not in an Ionic project directory. Project context may be
missing.

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

System:

Node : v8.9.1
npm  : 5.5.1 
OS   : OS X El Capitan

Misc:

backend : pro

How can I solve it?

Step 1: Mention the command you executed and where exactly you get this error.

1 Like

Hello,

maybe this helps.

I set it up to 4096. Since them it is woking for me.

Best regards, anna-liebt

1 Like

the error appears when I try to create a new project, for example:

$ ionic start MyIonicProject tutorial

so, it starts to create the folder and proceed to download the files, then I wait for a moment and the error appears aborting the process.

Hello,
I don’t know if it helps you, but give it a try. I searched a few days to find a solution that worked in my case. Give it a try, it costs you less then 10 minutes to read, to change, to reboot and to test.
If this doesn’t help, then maybe try something different.

Best regards, anna-liebt.

I tried the command:

ionic=“node --max-old-space-size=4096 $(which ionic)”

now, when I create a new project it says the same error:

⠼ Creating directory ./myApp
:heavy_check_mark: Creating directory ./myApp - done!
:heavy_check_mark: Downloading and extracting tabs starter - done!

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

ionic integrations enable cordova --quiet
:heavy_check_mark: Downloading integration cordova - done!
:heavy_check_mark: Copying integrations files to project - done!
[OK] Added cordova integration!

Installing dependencies may take several minutes.

:sparkles: IONIC DEVAPP :sparkles:

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

  • :key: Test on iOS and Android without Native SDKs
  • :rocket: LiveReload for instant style and JS updates

️–> Install DevApp: Ionic DevApp - Appflow

npm i
⠙ Running command
<— Last few GCs —>

[1075:0x102804600] 514307 ms: Mark-sweep 1349.2 (1407.4) → 1349.2 (1407.4) MB, 3758.1 / 0.1 ms allocation failure GC in old space requested
[1075:0x102804600] 516305 ms: Mark-sweep 1349.2 (1407.4) → 1349.2 (1375.9) MB, 1972.5 / 0.0 ms last resort GC in old space requested
[1075:0x102804600] 518898 ms: Mark-sweep 1349.2 (1375.9) → 1349.2 (1375.9) MB, 2592.9 / 0.0 ms last resort GC in old space requested

<— JS stacktrace —>

==== JS stack trace =========================================

Security context: 0x9d96e725ec1
1: /* anonymous */ [/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/utils/shell.js:~44] [pc=0x16219cbc737c](this=0x9d9f3048809 ,chunk=0x9d9b7a0f4c9 )
2: emit [events.js:~156] [pc=0x16219cbcbccf](this=0x9d9f3048809 ,type=0x9d96e736619 <String[4]: data>)
3: arguments adaptor frame…

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/usr/local/bin/node]
2: node::FatalException(v8::Isolate*, v8::Localv8::Value, v8::Localv8::Message) [/usr/local/bin/node]
3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
4: v8::internal::factory::NewUninitializedFixedArray(int) [/usr/local/bin/node]
5: v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2> >::GrowCapacity(v8::internal::Handlev8::internal::JSObject, unsigned int) [/usr/local/bin/node]
6: v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
7: 0x16219ca0463d
Abort trap: 6

edit:

I think that I have an error with the ionic files or CLI

ionic info --verbose

[DEBUG] Reason for not using local CLI: BASE_DIRECTORY_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: ‘/Users/user/Desktop/ionic3’, local: false, binPath:
‘/usr/local/lib/node_modules/ionic/bin/ionic’, libPath:
‘/usr/local/lib/node_modules/ionic/dist/index.js’ }
[DEBUG] Daemon found (pid: 613)
[WARN] You are not in an Ionic project directory. Project context may be
missing.

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

System:

Node : v8.9.1
npm  : 5.5.1 
OS   : OS X El Capitan

Misc:

backend : pro

Hello,

is ionic serve working on a fresh created app without DevApp?

Maybe the tlinked tiny tool in the article can help?

Best regards, anna-liebt

no, it doesn’t work. Looks like something is wrong when I upgrade the version of ionic. :sob:

Hello,
thats bad.
With the tiny tool it is not working?

Maybe a extended search in internet helps, because it seems that we are not alone with this issue.

Best regards, anna-liebt