Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ionic cordova build - node_contextify.cc:635 Assertion `args[1]->IsString()' failed #3462

Closed
dave-k opened this issue Aug 1, 2018 · 7 comments
Labels

Comments

@dave-k
Copy link

dave-k commented Aug 1, 2018

Description:
ionic v1 app does not build
There is an issue with node and the 'internal contextify script' : Assertion `args[1]->IsString()' failed

Steps to Reproduce:

$ ionic cordova build ios

Output:

> ionic-v1 build
ionic-v1[53011]: ../src/node_contextify.cc:635:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.

My ionic info:

<paste here>

Other Information:
macOS High Sierra v10.13.5

$ npm -v
6.2.0
$ node -v
v10.7.0
$ ionic -v
CLI 4.0.2
$ cordova -v
8.0.0
@ionitron-bot ionitron-bot bot added the triage label Aug 1, 2018
@imhoffd
Copy link
Contributor

imhoffd commented Aug 1, 2018

@dave-k Have you tried reinstalling dependencies?

@dave-k
Copy link
Author

dave-k commented Aug 1, 2018

I reinstalled node_modules, but the error is still there.

rm -rf node_modules 
npm install 

@imhoffd
Copy link
Contributor

imhoffd commented Aug 1, 2018

Okay, I installed Node 10.7.0 and I also get the error. However, when I do this, the issue is resolved: nodejs/node#20285 (comment)

Please try:

rm -rf node_modules
rm package-lock.json
npm cache clean --force
npm install 

@dave-k
Copy link
Author

dave-k commented Aug 1, 2018

The issue is resolved, but now I get this error - not sure if it is related or a new issue.
Error: Command failed: xcrun simctl list --json

$ ionic cordova build ios
> ionic-v1 build
[12:49:26] Cannot run sass task: missing in gulpfile.js
> cordova build ios
Running command: /Users/dev/mobileapp/hooks/after_prepare/010_add_platform_class.js /Users/dev/mobileapp
add to body class: platform-ios
(node:62271) UnhandledPromiseRejectionWarning: Error: Command failed: xcrun simctl list --json
dyld: Symbol not found: _SimDeviceBootKeyDisabledJobs
  Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/simctl
  Expected in: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
  in /Applications/Xcode.app/Contents/Developer/usr/bin/simctl

at ChildProcess.exithandler (child_process.js:291:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:961:16)
    at Socket.stream.socket.on (internal/child_process.js:380:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:599:12)

@imhoffd
Copy link
Contributor

imhoffd commented Aug 1, 2018

That looks like an issue with Xcode. Make sure it's up to date, and make sure you open it.

@umadesign
Copy link

npm install natives solved this on my setup:

Ionic:

ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic1 1.2.4
@ionic/v1-toolkit : 1.0.22

System:

NodeJS : v11.6.0 (/usr/local/Cellar/node/11.6.0/bin/node)
npm : 6.9.0
OS : macOS High Sierra

@imhoffd
Copy link
Contributor

imhoffd commented Mar 28, 2019

I would not recommend installing that.

The best course of action is to switch to a supported LTS version of Node. If problem persists, try the steps in this comment: #3462 (comment)

@ionic-team ionic-team locked and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants