Error trying to run npm install for swift-component-gen
tettoffensive opened this issue · comments
I'm getting this error when running nom install
in swift-component-gen. I'm not sure what to make of it (I'm an iOS dev). Maybe I have the wrong version of something installed.
osx / npm -v 5.6.0 / node 9.3.0
~/Lona/LonaStudio/Scripting/Modules/component-to-sketch ⮀ ⭠ swift-component-gen ●✚ ⮀ npm install
npm WARN deprecated babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
> fsevents@1.1.3 install /Users/Stuart/Lona/LonaStudio/Scripting/Modules/component-to-sketch/node_modules/fsevents
> node install
[fsevents] Success: "/Users/Stuart/Lona/LonaStudio/Scripting/Modules/component-to-sketch/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node" is installed via remote
> ref@1.1.3 install /Users/Stuart/Lona/LonaStudio/Scripting/Modules/component-to-sketch/node_modules/ref
> node-gyp rebuild
2018-01-12 14:24:43.771 xcodebuild[64074:1692028] [MT] DVTPlugInManager: Required plug-in compatibility UUID B395D63E-9166-4CD6-9287-6889D507AD6A for KSImageNamed.ideplugin (com.ksuther.KSImageNamed) not present
CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:619:11: warning: 'ForceSet' is deprecated [-Wdeprecated-declarations]
target->ForceSet(Nan::New<v8::String>("endianness").ToLocalChecked(), Nan::New<v8::S...
^
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:3114:3: note: 'ForceSet' has been explicitly
marked deprecated here
V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty",
^
/Users/Stuart/.node-gyp/9.3.0/include/node/v8config.h:321:29: note: expanded from macro
'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/binding.cc:619:131: error: no viable conversion from 'v8::PropertyAttribute' to
'Local<v8::Value>'
...static_cast<PropertyAttribute>(ReadOnly|DontDelete));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:197:7: note: candidate constructor (the
implicit copy constructor) not viable: no known conversion from 'v8::PropertyAttribute'
to 'const v8::Local<v8::Value> &' for 1st argument
class Local {
^
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:197:7: note: candidate constructor (the
implicit move constructor) not viable: no known conversion from 'v8::PropertyAttribute'
to 'v8::Local<v8::Value> &&' for 1st argument
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:201:13: note: candidate template ignored:
could not match 'Local<type-parameter-0-0>' against 'v8::PropertyAttribute'
V8_INLINE Local(Local<S> that)
^
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:3116:51: note: passing argument to parameter
'value' here
Local<Value> value,
^
../src/binding.cc:620:11: warning: 'ForceSet' is deprecated [-Wdeprecated-declarations]
target->ForceSet(Nan::New<v8::String>("NULL").ToLocalChecked(), WrapNullPointer(), s...
^
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:3114:3: note: 'ForceSet' has been explicitly
marked deprecated here
V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty",
^
/Users/Stuart/.node-gyp/9.3.0/include/node/v8config.h:321:29: note: expanded from macro
'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/binding.cc:620:86: error: no viable conversion from 'v8::PropertyAttribute' to
'Local<v8::Value>'
...WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:197:7: note: candidate constructor (the
implicit copy constructor) not viable: no known conversion from 'v8::PropertyAttribute'
to 'const v8::Local<v8::Value> &' for 1st argument
class Local {
^
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:197:7: note: candidate constructor (the
implicit move constructor) not viable: no known conversion from 'v8::PropertyAttribute'
to 'v8::Local<v8::Value> &&' for 1st argument
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:201:13: note: candidate template ignored:
could not match 'Local<type-parameter-0-0>' against 'v8::PropertyAttribute'
V8_INLINE Local(Local<S> that)
^
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:3116:51: note: passing argument to parameter
'value' here
Local<Value> value,
^
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:208:5: error: assigning to 'v8::Context *'
from incompatible type 'v8::String *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/Stuart/.node-gyp/9.3.0/include/node/v8.h:162:39: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^~~~~~~~~~~~~~~~~~
../src/binding.cc:619:20: note: in instantiation of function template specialization
'v8::Local<v8::Context>::Local<v8::String>' requested here
target->ForceSet(Nan::New<v8::String>("endianness").ToLocalChecked(), Nan::New<v8::S...
^
2 warnings and 3 errors generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/Cellar/node/9.3.0_1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Stuart/Lona/LonaStudio/Scripting/Modules/component-to-sketch/node_modules/ref
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN eslint-config-airbnb-base@11.3.2 requires a peer of eslint@^3.19.0 || ^4.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import@2.8.0 requires a peer of eslint@2.x - 4.x but none is installed. You must install peer dependencies yourself.
npm WARN component-to-sketch@1.0.0 No description
npm WARN component-to-sketch@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ref@1.1.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ref@1.1.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Hmmm.... I'm not sure. I would start by trying on node 8.4.0, since that's the version I currently bundle with Lona Studio.
I suspect this has to do with a dependency on https://github.com/TooTallNate/NodObjC, which I actually don't use for much and could take out at some point.
Btw, it looks like you're installing the Sketch file generation stuff (LonaStudio/Scripting/Modules/component-to-sketch/
). The swift-component-gen
stuff is all in compiler/core/
. If you want to try the Swift component generation (very much a work in progress), you can install yarn
globally, and then run yarn install
in compiler/core/
. After that, yarn start
and node demo.bs.js swift component path_to_component.component
.