backstopmedia / bleeding-edge-sample-app Goto Github PK
View Code? Open in Web Editor NEWA sample app for a Bleeding Edge Press book.
License: Apache License 2.0
A sample app for a Bleeding Edge Press book.
License: Apache License 2.0
From the initial conversation we defined the following:
/surveys - browse all surveys
/surveys/foo - take survey foo
/surveys/foo/edit - view/edit survey foo
/surveys/foo/summary - view a chart summarizing response data
I just run npm install
according to README.md
, but found too many errors as follows. How do I fix them?
$ npm install
> [email protected] install /Users/ishida/git/vendor/bleeding-edge-sample-app/node_modules/watchify/node_modules/fsevents
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../../nan/nan.h:339:13: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:343:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
~~~~^
../../nan/nan.h:343:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:348:9: error: no type named 'ThrowException' in namespace 'v8'
v8::ThrowException(error);
~~~~^
../../nan/nan.h:355:65: error: no member named 'New' in 'v8::String'
v8::Local<v8::Value> err = v8::Exception::Error(v8::String::New(msg));
~~~~~~~~~~~~^
../../nan/nan.h:356:50: error: expected '(' for function-style cast or type construction
v8::Local<v8::Object> obj = err.As<v8::Object>();
~~~~~~~~~~^
../../nan/nan.h:356:52: error: expected expression
v8::Local<v8::Object> obj = err.As<v8::Object>();
^
../../nan/nan.h:357:65: error: too few arguments to function call, expected 2, have 1
obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
~~~~~~~~~~~~~~ ^
/Users/ishida/.node-gyp/6.9.2/include/node/v8.h:2558:3: note: 'New' declared here
static Local<Integer> New(Isolate* isolate, int32_t value);
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:357:26: error: no member named 'New' in 'v8::String'
obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
~~~~~~~~~~~~^
../../nan/nan.h:369:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:373:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
~~~~^
../../nan/nan.h:373:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:377:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:381:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
~~~~^
../../nan/nan.h:381:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../../nan/nan.h:406:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../../nan/nan.h:141:71: note: expanded from macro 'NAN_INLINE'
# define NAN_INLINE(declarator) inline __attribute__((always_inline)) declarator
^~~~~~~~~~
../../nan/nan.h:416:12: error: no matching function for call to 'New'
return node::Buffer::New(data, size);
^~~~~~~~~~~~~~~~~
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'char *' to 'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:34:40: note: candidate function not viable: no known conversion from 'char *' to 'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:46:40: note: candidate function not viable: requires 3 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:39:40: note: candidate function not viable: requires 5 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:420:12: error: no matching function for call to 'New'
return node::Buffer::New(size);
^~~~~~~~~~~~~~~~~
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:31:40: note: candidate function not viable: requires 2 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:34:40: note: candidate function not viable: requires at least 2 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:46:40: note: candidate function not viable: requires 3 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:39:40: note: candidate function not viable: requires 5 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:427:26: error: no member named 'Use' in namespace 'node::Buffer'
return node::Buffer::Use(data, size);
~~~~~~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/ishida/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.1.0
gyp ERR! command "/Users/ishida/.nvm/versions/node/v6.9.2/bin/node" "/Users/ishida/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ishida/git/vendor/bleeding-edge-sample-app/node_modules/watchify/node_modules/fsevents
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN [email protected] license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchify/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
It just leaves a broken image spot.
cat README.md
A sample app for a Bleeding Edge Press book.
npm install
That's it! Now you're ready to run the app or run tests.
npm start
You can then browse to http://localhost:8080 to try the Survey Builder.
Run tests once:
npm test
Run tests in watch mode:
npm run-script watch
:bleeding-edge-sample-app-master aiellor$ npm install
[email protected] install /Users/_work/bleeding-edge-sample-app-master/node_modules/watchify/node_modules/fsevents
node-gyp rebuild
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../../nan/nan.h:339:13: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:343:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../../nan/nan.h:343:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:348:9: error: no type named 'ThrowException' in namespace 'v8'
v8::ThrowException(error);
~~~~^
../../nan/nan.h:355:53: error: no member named 'New' in 'v8::String'; did you mean 'v8::TypeSwitch::New'?
v8::Localv8::Value err = v8::Exception::Error(v8::String::New(msg));
^~~~~~~~~~~~~~~
v8::TypeSwitch::New
/Users/aiellor/.node-gyp/5.3.0/include/node/v8.h:4704:28: note: 'v8::TypeSwitch::New' declared here
static Local New(Local type);
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:355:69: error: calling a private constructor of class 'v8::Localv8::FunctionTemplate'
v8::Localv8::Value err = v8::Exception::Error(v8::String::New(msg));
^
/Users/aiellor/.node-gyp/5.3.0/include/node/v8.h:326:13: note: declared private here
V8_INLINE Local(S* that)
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:357:65: error: too few arguments to function call, expected 2, have 1
obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
~~~~~~~~~~~~~~ ^
/Users/aiellor/.node-gyp/5.3.0/include/node/v8.h:2496:3: note: 'New' declared here
static Local New(Isolate* isolate, int32_t value);
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:357:26: error: no member named 'New' in 'v8::String'
obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
~~~~~~~~~~~~^
../../nan/nan.h:369:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:373:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../../nan/nan.h:373:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:377:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:381:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../../nan/nan.h:381:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:406:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../../nan/nan.h:141:71: note: expanded from macro 'NAN_INLINE'
^
../../nan/nan.h:416:12: error: no matching function for call to 'New'
return node::Buffer::New(data, size);
^~~~~~~~~~~~~~~~~
/Users/.node-gyp/5.3.0/include/node/node_buffer.h:28:40: note: candidate function not viable: no known conversion from 'char ' to 'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate, size_t length);
^
/Users/.node-gyp/5.3.0/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'char ' to 'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate,
^
/Users/.node-gyp/5.3.0/include/node/node_buffer.h:43:40: note: candidate function not viable: requires 3 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/aiellor/.node-gyp/5.3.0/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:420:12: error: no matching function for call to 'New'
return node::Buffer::New(size);
^~~~~~~~~~~~~~~~~
/Users/.node-gyp/5.3.0/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, size_t length);
^
/Users/.node-gyp/5.3.0/include/node/node_buffer.h:31:40: note: candidate function not viable: requires at least 2 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/.node-gyp/5.3.0/include/node/node_buffer.h:43:40: note: candidate function not viable: requires 3 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/.node-gyp/5.3.0/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:427:26: error: no member named 'Use' in namespace 'node::Buffer'
return node::Buffer::Use(data, size);
~~~~~~~~~~~~~~^
../../nan/nan.h:727:49: error: too few arguments to function call, single argument 'isolate' was not specified
v8::Localv8::Object obj = v8::Object::New();
~~~~~~~~~~~~~~~ ^
/Users/.node-gyp/5.3.0/include/node/v8.h:2930:3: note: 'New' declared here
static Local New(Isolate* isolate);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fse/fsevents.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:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/Cellar/node/5.3.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/aiello/_work/bleeding-edge-sample-app-master/node_modules/watchify/node_modules/fsevents
gyp ERR! node -v v5.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: node-gyp rebuild
npm WARN install:[email protected] Exit status 1
npm WARN EPACKAGEJSON [email protected] license should be a valid SPDX license expression
:bleeding-edge-sample-app-master $
Here's a rough idea of what we'll probably need:
SurveyView
: A controller-view for the collection of survey items
SurveyItemView
: A wrapper, mediating between the parent survey and the form fields within.
Item views grouping the various form fields and labels, each making a type of survey input. This could be as simple as the following, configurable via the data model we pass in:
<div>
<label>{label}</header>
<textarea ... ></textarea>
</div>
I'm working from the master branch. I guess that's the right place to start?
I discovered that nothing happens when I press Submit on the Survey builder.
So I decided to run the tests:
PhantomJS 2.0.0 (Mac OS X): Executed 6 of 77 SUCCESS (0 secs / 0.04 secs)
ERROR [karma]: [TypeError: Line must be greater than or equal to 1, got 0]
TypeError: Line must be greater than or equal to 1, got 0
at SourceMapConsumer_findMapping [as _findMapping] (/Users/martins/Work/ReactJS/bleeding-edge-sample-app/node_modules/karma/node_modules/source-map/lib/source-map/source-map-consumer.js:286:15)
at SourceMapConsumer_originalPositionFor [as originalPositionFor] (/Users/martins/Work/ReactJS/bleeding-edge-sample-app/node_modules/karma/node_modules/source-map/lib/source-map/source-map-consumer.js:3
46:24)
at /Users/martins/Work/ReactJS/bleeding-edge-sample-app/node_modules/karma/lib/reporter.js:49:28
at String.replace (native)
at /Users/martins/Work/ReactJS/bleeding-edge-sample-app/node_modules/karma/lib/reporter.js:36:23
at /Users/martins/Work/ReactJS/bleeding-edge-sample-app/node_modules/karma/lib/reporters/base.js:105:14
at Array.forEach (native)
Am I doing anything wrong or is it a bug in the master branch?
Cheers,
Martin
Options:
I am getting weird error 8 with below output while doing npm start:
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! not ok code 0
I have installed nodejs-legacy
$ which nodejs
/usr/bin/nodejs
Can somebody help with it.
To keep our text editors using the same formatting rules we can use editorconfig.
Then we just need to install the correct plugin for our editors.
Hi guys
I was able to install packages with npm install
but when I did npm start
, this is what I got:
App started goto - http://0.0.0.0:8080
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at Server.listen (net.js:1135:5)
at EventEmitter.app.listen (/home/steve/dev/js/react/bleeding-edge-sample-app/node_modules/express/lib/application.js:559:24)
at Object.<anonymous> (/home/steve/dev/js/react/bleeding-edge-sample-app/server/server.js:33:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! not ok code 0
btw:
$ which node
/usr/bin/node
$ which nodejs
/usr/bin/nodejs
I have nodejs-legacy
also installed on my Ubuntu 14.04
system.
Proposed API - thoughts/feedback please.
//survey data
POST /api/surveys - create new survey
GET /api/surveys - all surveys
GET /api/surveys/:id - get single survey
PUT /api/surveys/:id - update survey
DELETE /api/surveys/:id - delete survey
//response data
POST /api/surveys/:id/responses - create new survey response
GET /api/surveys/:id/responses - all responses responses
GET /api/surveys/:id/responses/:id - get single response
PUT /api/surveys/:id/responses/:id - update response
DELETE /api/surveys/:id/responses/:id - delete response
Adding surveys with drag and drop modules
After cloning the repo and running npm install
, npm start
fails with the following error:
App started goto - http://0.0.0.0:8080
events.js:85
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at exports._errnoException (util.js:746:11)
at Server._listen2 (net.js:1156:14)
at listen (net.js:1182:10)
at Server.listen (net.js:1267:5)
at EventEmitter.app.listen (/home/statistician/exercises/React/bleeding-edge-sample-app/node_modules/express/lib/application.js:595:24)
at Object.<anonymous> (/home/statistician/exercises/React/bleeding-edge-sample-app/server/server.js:33:9)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
Contents of npm-debug.log
:
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart [email protected]
6 verbose unsafe-perm in lifecycle true
7 info start [email protected]
8 verbose unsafe-perm in lifecycle true
9 info [email protected] Failed to exec start script
10 verbose stack Error: [email protected] start: `node server/server.js`
10 verbose stack Exit status 1
10 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
10 verbose stack at EventEmitter.emit (events.js:110:17)
10 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
10 verbose stack at ChildProcess.emit (events.js:110:17)
10 verbose stack at maybeClose (child_process.js:1015:16)
10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid [email protected]
12 verbose cwd /home/statistician/exercises/React/bleeding-edge-sample-app
13 error Linux 3.16.4-1-ARCH
14 error argv "node" "/usr/bin/npm" "start"
15 error node v0.12.4
16 error npm v2.11.2
17 error code ELIFECYCLE
18 error [email protected] start: `node server/server.js`
18 error Exit status 1
19 error Failed at the [email protected] start script 'node server/server.js'.
19 error This is most likely a problem with the bleeding-edge-sample-app package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error node server/server.js
19 error You can get their info via:
19 error npm owner ls bleeding-edge-sample-app
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]
Working on adding bootstrap and some initial styling of the layout
$ git clone https://github.com/backstopmedia/bleeding-edge-sample-app.git
Cloning into 'bleeding-edge-sample-app'...
remote: Counting objects: 1334, done.
remote: Total 1334 (delta 0), reused 0 (delta 0), pack-reused 1334
Receiving objects: 100% (1334/1334), 367.27 KiB | 322.00 KiB/s, done.
Resolving deltas: 100% (636/636), done.
Checking connectivity... done.
$ cd bleeding-edge-sample-app/
$ npm install
npm WARN deprecated [email protected]: Renamed karma-browserify as of 1.0
npm ERR! git clone git://github.com/karlmikko/react-router.git Cloning into bare repository '/Users/nabedge/.npm/_git-remotes/git-github-com-karlmikko-react-router-git-51b66de8'...
npm ERR! git clone git://github.com/karlmikko/react-router.git fatal: unable to connect to github.com:
npm ERR! git clone git://github.com/karlmikko/react-router.git github.com[0: 192.30.252.131]: errno=Operation timed out
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code 128
npm ERR! Command failed: git clone --template=/Users/nabedge/.npm/_git-remotes/_templates --mirror git://github.com/karlmikko/react-router.git /Users/nabedge/.npm/_git-remotes/git-github-com-karlmikko-react-router-git-51b66de8
npm ERR! Cloning into bare repository '/Users/nabedge/.npm/_git-remotes/git-github-com-karlmikko-react-router-git-51b66de8'...
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.252.131]: errno=Operation timed out
npm ERR!
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
Add
<MainHeader>
and <Navigation />
Enviroment: Mac OSX yosemite
Node Version: v0.10.33
Npm Version: 2.1.9
run npm test, got following error:
[ReactifyError: /Users/ypwu1/dev/github/bleeding-edge-sample-app/test/client/shared_examples/interval_mixin_shared_examples.js: Lower case component names (componentClass) are no longer supported in JSX: See http://fb.me/react-jsx-lower-case]
name: 'ReactifyError',
run npm run-script watch
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "watch"
npm ERR! node v0.10.33
npm ERR! npm v2.1.9
npm ERR! missing script: watch
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! http://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /Users/ypwu1/dev/github/bleeding-edge-sample-app/npm-debug.log
Yuans-MacBook-Pro-2:bleeding-edge-sample-app ypwu1$
We've got the api on the server and the survey creation/survey taking components. Now we need to integrate them into a working experience.
I imagine this will be collection of survey items, something like this:
2014-Aug-07 — Updated to incorporate ideas from comments
survey: {
id: 435,
title: "Harry Potter Character Quiz",
description: "Which Harry Potter character are you? Finally put this burning question to rest...",
createdAt: someDate,
updatedAt: someOtherDate,
items: [{
"id": 35,
"type": "textarea",
"label": "A descriptive label",
"value": "the default value"
}, {
"id": 36,
"type": "options",
"allow-multiple": true,
"label": "Choose from the following...",
"choices": [...]
}]
};
In the interest of wrapping up the project I wanted to see what everyone thought of the following. Near as I can tell there are only a few pieces left:
Thoughts?
If you add a few questions, you can't add any more unless you zoom out. This is because the drop target gets pushed down, and is off page very quickly.
We could fix this by...
Any preferences? Both are literally a copy/paste to implement.
I purchased the book and tried out the sample app. npm install emitted multiple errors. Just wondering if the book and sample app are still being maintained. Thanks.
excuse me?
the father component name is AnswerMultipleChoiceQuestion
the child component name is AnswerRadioInput
when i initial child component in father component by
AnswerRadioInput({ id: "choice-1", name: "choice", label: "1", value: "1", checked: true });
i get an error in console log
react.js:5816 Uncaught TypeError: Cannot read property '__reactAutoBindMap' of undefined
what 's wrong? can you help me
I notice the use of new
for creating new components
var ComponentItem = React.createClass({...});
var item = new ComponentItem(props);
I don't know if the new
is require or if will confuse people.
As the JSX transform doesn't insert new
.
React now creates descriptors of Components not the component it self.
What does everyone else think???
@rtfeldman I think you need to do this since the repo is on your account
<RestrictedTextBox
value={String}
onChange={Function}
// optional
minLength={Number}
maxLength={Number}
length={Number} />
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.