rwieruch / favesound-redux

🎶 A SoundCloud Client in React + Redux running in production. Live Demo and Source Code to explore React + Redux as a beginner.
http://www.robinwieruch.de/the-soundcloud-client-in-react-redux/
1.59k stars 249 forks source link

Need help: Error occurs when trying to run command npm start #18

Open chriszhangusc opened 7 years ago

chriszhangusc commented 7 years ago

Hi guys, I tried to run the app locally, after I clone the git repo, the 'npm install' worked just fine but when I ran 'npm start' I got the following output, I am using a Mac OS X with node version: 7.5.0 and npm 4.2.0. Not sure what is going on here.

webpack-dev-server --progress --colors --hot --config ./webpack.config.js
70% 1/1 build moduleshttp://localhost:8080/webpack-dev-server/
webpack result is served from /

content is served from ./dist
404s will fallback to /index.html
 45% 13/22 build modules

> #
> # Fatal error in ../deps/v8/src/api.cc, line 1051
> # Check failed: !value_obj->IsJSReceiver() || value_obj->IsTemplateInfo().
> #

==== C stack trace ===============================

    0   node                                0x0000000100bce203 v8::base::debug::StackTrace::StackTrace() + 19
    1   node                                0x0000000100bcb389 V8_Fatal + 233
    2   node                                0x0000000100147afa v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute) + 330
    3   binding.node                        0x0000000104f363f2 SassTypes::Boolean::get_constructor() + 352
    4   binding.node                        0x0000000104f3830b SassTypes::Factory::initExports(v8::Local<v8::Object>) + 407
    5   node                                0x00000001009cf21f node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) + 854
    6   node                                0x000000010017c39a v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) + 378
    7   node                                0x00000001001e023c v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 924
    8   node                                0x00000001001df679 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 281
    9   ???                                 0x000008f8dcc063a7 0x0 + 9864948507559
Illegal instruction: 4
chriszhangusc commented 7 years ago

OK, after switching my node version to 6.9.5 by nvm, everything seems to be fine now.

rwieruch commented 7 years ago

@MiniPekka I had the same problem, because I switch node versions a lot. Anything we could do against it? In a dreamworld it would work for everyone.

chriszhangusc commented 7 years ago

@rwieruch After some research I have found out it was the version of sass-node that caused the incompatibility with node 7 when trying to run npm start, my solution would be upgrade node-sass to 3.8.0. It also gets rid of those cpp compiling warnings when we do npm install.

rwieruch commented 7 years ago

https://github.com/rwieruch/favesound-redux/pull/22

rwieruch commented 7 years ago

Seems to be a general problem with Sass and changing Node environment. You can run npm rebuild node-sass.

Issue: https://github.com/sass/node-sass/issues/1527

rwieruch commented 7 years ago

Added .nvmrc file. When you use nvm to manage your node versions, you can type nvm use to use the according node version for this project.

chriszhangusc commented 6 years ago

I ran into this problem again with node 8.0 installed on my machine, and to make sure new user with node 8 does not get confused by this issue, I think we should update the node-sass to 4.5.3 to resolve this issue. (Also see: https://github.com/sass/node-sass/issues/1984)

rwieruch commented 6 years ago

Oh my .... Sass :) Did it work for you when you updated node-sass? If so, then I would say go for it 👍 I guess it would be great to update it for its sister project as well: https://github.com/rwieruch/favesound-mobx