Getting hundreds of errors when running 'sudo yo meanjs' - phantomjs

I am attempting to work through the following tutorial: http://www.bradoncode.com/tutorials/mean-stack-tutorial-part-1-setup/
to teach my self MEAN stack development. All of the packages seem to be installed correctly as far as I can tell.
When I run 'sudo yo mean js' I get over 500 lines of errors and warnings (more than I can put in a post here). The following are the first hundred or so in hopes that someone can see the pattern and point me in the right direction.
Not sure if this is relevant but it probably takes around 10 to 15 minutes for 'sudo yo meanjs' to return these errors.
Much thanks in advance!
Error: Command failed: /bin/sh -c cd mean && npm install
npm WARN deprecated phantomjs#2.1.3: Package renamed to phantomjs-prebuilt. Please update 'phantomjs' package references to 'phantomjs-prebuilt'
npm WARN deprecated lodash#0.9.2: Grunt needs your help! See https://github.com/gruntjs/grunt/issues/1403.
npm WARN deprecated graceful-fs#1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated graceful-fs#2.0.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated graceful-fs#3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN prefer global jshint#2.8.0 should be installed with -g
npm WARN prefer global nodemon#1.9.0 should be installed with -g
npm WARN prefer global node-gyp#3.3.0 should be installed with -g
npm WARN prefer global node-inspector#0.10.2 should be installed with -g
In file included from ../src/bufferutil.cc:16:
../../nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../../nan/nan.h:256:25: note: previous definition is here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../../nan/nan.h:661:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../../nan/nan.h:672:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../src/bufferutil.cc:16:
../../nan/nan.h:676:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st argument
class Local {
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st argument
class Local {
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local<S> that)
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against 'v8::MaybeLocal<v8::Object>'
V8_INLINE Local(S* that)
^
In file included from ../src/bufferutil.cc:16:
../../nan/nan.h:683:26: error: no member named 'Use' in namespace 'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
~~~~~~~~~~~~~~^
In file included from ../src/bufferutil.cc:7:
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:414:12: note: in instantiation of function template specialization 'v8::Local<v8::Primitive>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
^
../../nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:221:5: error: assigning to 'v8::Boolean *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:424:12: note: in instantiation of function template specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
^
../../nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:221:5: error: assigning to 'v8::Function *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:1514:12: note: in instantiation of function template specialization 'v8::Local<v8::Function>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
^
../../nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:221:5: error: assigning to 'v8::Object *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:1632:12: note: in instantiation of function template specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here
return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());
^
../../nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
9 errors generated.
make: *** [Release/obj.target/bufferutil/src/bufferutil.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:276: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/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/christopherward/MeanStackTutorial/NorthwindNode/mean/node_modules/bufferutil
gyp ERR! node -v v4.3.1
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN install:bufferutil#1.1.0 bufferutil#1.1.0 install: `node-gyp rebuild`
npm WARN install:bufferutil#1.1.0 Exit status 1
./Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw { dev: 16777218,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 19122429,
size: 1318,
blocks: 8,
atime: Tue Feb 23 2016 12:32:42 GMT-0800 (PST),
mtime: Tue Feb 23 2016 12:32:42 GMT-0800 (PST),
ctime: Tue Feb 23 2016 12:32:42 GMT-0800 (PST),
birthtime: Tue Feb 23 2016 12:32:42 GMT-0800 (PST) }
./Release/.deps/Release/obj.target/validation/src/validation.o.d.raw { dev: 16777218,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 19122463,
size: 1318,
blocks: 8,
atime: Tue Feb 23 2016 12:32:51 GMT-0800 (PST),
mtime: Tue Feb 23 2016 12:32:51 GMT-0800 (PST),
ctime: Tue Feb 23 2016 12:32:51 GMT-0800 (PST),
birthtime: Tue Feb 23 2016 12:32:51 GMT-0800 (PST) }
In file included from ../src/validation.cc:15:
../../nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../../nan/nan.h:256:25: note: previous definition is here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../../nan/nan.h:661:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../../nan/nan.h:672:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../src/validation.cc:15:
../../nan/nan.h:676:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st argument
class Local {
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st argument
class Local {
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local<S> that)
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against 'v8::MaybeLocal<v8::Object>'
V8_INLINE Local(S* that)
^
In file included from ../src/validation.cc:15:
../../nan/nan.h:683:26: error: no member named 'Use' in namespace 'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
~~~~~~~~~~~~~~^
In file included from ../src/validation.cc:7:
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~

generator-meanjs is only compatible with lower versions of Node (0.12.10) and NPM as of now.
To get it resolved, you have to downgrade your node, npm and meanjs generator versions. There is no implementation of sub generators such as CRUD or Vertical modules in latest version of generator-meanjs.
If you have latest version of node installed - then you will end up with tons of errors. If you really want to use mean js generators I recommend you to downgrade your node version. (I prefer nvm - node version manager).
Check your generator version - npm view generator­meanjs versions and downgrade to 0.12.x version of generator.
The versions should be,
Node - 0.12.x
Npm - 2.x
generator-meanjs - 0.12.x
Once you are done, there will be no problem to use the fabulous MEAN stack generator.

Related

cannot build with react-native-msal, Deprecated Gradle features were used in this build

I'm really new to mobile development and I'm trying to implement authentication in a simple react-native app using react-native-msal.
I'm using React Native CLI (ie npx react-native run-android) and after initializing a new app and confirming all is working my my virtual device, I added react-native-msal and followed the directions to set things up for android.
But after running the areact-native-msal, the build fails with "Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0."
I've tried changing versions in the gradle-wrapper.properties file but I don't get any further.
PS C:\Working\MSALDemo> npx react-native run-android
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 941 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
> Configure project :app
Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. Class name for the included build object: org.gradle.composite.internal.DefaultIncludedBuild$IncludedBuildImpl_Decorated.
> Task :react-native-msal:compileDebugJavaWithJavac
> Task :app:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
48 actionable tasks: 42 executed, 6 up-to-date
Warning: This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
Note: C:\Working\MSALDemo\node_modules\react-native-msal\android\src\main\java\com\reactnativemsal\RNMSALModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Working\MSALDemo\node_modules\react-native-msal\android\src\main\java\com\reactnativemsal\RNMSALModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\newarchitecture\MainApplicationReactNativeHost.java:22: error: cannot find symbol
import com.msaldemo.BuildConfig;
^
symbol: class BuildConfig
location: package com.msaldemo
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainActivity.java:36: error: cannot find symbol
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
^
symbol: variable BuildConfig
location: class MainActivityDelegate
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:22: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:45: error: cannot find symbol
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:45: error: illegal parenthesized expression
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:56: error: cannot find symbol
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:70: error: cannot find symbol
if (BuildConfig.DEBUG) {
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:70: error: illegal parenthesized expression
if (BuildConfig.DEBUG) {
^
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\newarchitecture\MainApplicationReactNativeHost.java:42: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
location: class MainApplicationReactNativeHost
Note: C:\Working\MSALDemo\android\app\src\debug\java\com\msaldemo\ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
9 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 17s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Warning: This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
Note: C:\Working\MSALDemo\node_modules\react-native-msal\android\src\main\java\com\reactnativemsal\RNMSALModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Working\MSALDemo\node_modules\react-native-msal\android\src\main\java\com\reactnativemsal\RNMSALModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\newarchitecture\MainApplicationReactNativeHost.java:22: error: cannot find symbol
import com.msaldemo.BuildConfig;
^
symbol: class BuildConfig
location: package com.msaldemo
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainActivity.java:36: error: cannot find symbol
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
^
symbol: variable BuildConfig
location: class MainActivityDelegate
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:22: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:45: error: cannot find symbol
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:45: error: illegal parenthesized expression
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:56: error: cannot find symbol
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:70: error: cannot find symbol
if (BuildConfig.DEBUG) {
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:70: error: illegal parenthesized expression
if (BuildConfig.DEBUG) {
^
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\newarchitecture\MainApplicationReactNativeHost.java:42: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
location: class MainApplicationReactNativeHost
Note: C:\Working\MSALDemo\android\app\src\debug\java\com\msaldemo\ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
9 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 17s
at makeError (C:\Working\MSALDemo\node_modules\execa\index.js:174:9)
at C:\Working\MSALDemo\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Working\MSALDemo\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Working\MSALDemo\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
PS C:\Working\MSALDemo>
Figured out the missing piece, courtesy of this LinkedIn article.
I needed to
declare a dependency on MSAL in the app's build.gradle file:
implementation "com.microsoft.identity.client:msal:1.0+"
Add the following maven repository to your project's build.gradle:
allProjects {
repositories {
// ...
maven {
url "https://pkgs.dev.azure.com/MicrosoftDeviceSDK/DuoSDK-Public/_packaging/Duo-SDK-Feed/maven/v1"
}
}
}

Why I can't run the command "install NPM"

I have a project with Vue.js on GitHub which is built by my colleague and I want to see it in the local. After I clone in VScode and I want to use NPM install to first install NPM, but I failed and I don't understand what is the problem. the error message is:
../ext/call.cc:104:53: error: no matching member function for call to 'Get'
Local<String> current_key(Nan::To<String>(keys->Get(i)).ToLocalChecked());
~~~~~~^~~
/Users/alexchen/Library/Caches/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate
function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
/Users/alexchen/Library/Caches/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate
function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
../ext/call.cc:681:27: error: no matching member function for call to 'Get'
if (!op->ParseOp(obj->Get(type), &ops[i])) {
~~~~~^~~
/Users/alexchen/Library/Caches/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate
function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
/Users/alexchen/Library/Caches/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate
function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
Here is my version of Node and NPM
node -v
v13.10.1
npm -v
6.13.7
Is it a compatibility issue?

Why is npm giving weird errors?

I'm trying to install redux using npm, but upon running the command npm install redux, I get the following error:
bash-3.2$ sudo npm install redux
> fsevents#1.1.2 install /Users/prikshetsharma/Downloads/server/node_modules/fsevents
> node install
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-no\
de-v72-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.1.2 and node#12.10.0 (node-v72 ABI) (falling back to \
source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.\
1.2-node-v72-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.1.2 and node#12.10.0 (node-v72 ABI) (falling back to \
source compile with node-gyp)
SOLINK_MODULE(target) Release/.node
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:192:
../../nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
~~~ ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:192:
../../nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
~~~ ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:197:
In file included from ../../nan/nan_converters.h:59:
../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local
version. [-Wdeprecated-declarations]
X(Boolean)
^
../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X'
val->To ## TYPE(v8::Isolate::GetCurrent()->GetCurrentContext()) \
^
<scratch space>:19:1: note: expanded from here
ToBoolean
^
/Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node/v8.h:2536:3: note: 'ToBoolean' has been
explicitly marked deprecated hereIn file included from
../fsevents.cc:6:
In file included from ../../nan/nan.h:197:
In file included from ../../nan/nan_converters.h:59:
../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean V8_DEPRECATED("ToBoolean ca\
n never throw. Use Local version.",can
^never
throw. Use Local
version. [-Wdeprecated-declarations]
X(Boolean)
^
../../nan/nan_converters_43_inl.h:18/Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node/v8config.h::\
12311:: 29note:: expandednote : fromexpanded macrofrom 'X'macro
'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
val->To ## TYPE(v8::Isolate::GetCurrent()->GetCurrentContext()) \
^
<scratch space>:19:1: note: expanded from here
ToBoolean
^
/Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node/v8.h:2536:3: note: 'ToBoolean' has been
explicitly marked deprecated here
V8_DEPRECATED("ToBoolean can never throw. Use Local version.",In file included from
^
../fsevents.cc:6:
In file included from ../../nan/nan.h:197:
In file included from ../../nan/nan_converters.h:59:
../../nan/nan_converters_43_inl.h:40:1: warning: /Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node\
/v8config.h:'BooleanValue'311 :is29 :deprecated: noteBooleanValue: expandedcan fromnever macrothrow.
Use'V8_DEPRECATED'
Isolate version. [-Wdeprecated-declarations]
declarator __attribute__((deprecated(message)))
^
X(bool, Boolean)
^
../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
return val->NAME ## Value(isolate->GetCurrentContext()); \
^
<scratch space>:26:1: note: expanded from here
BooleanValue
^
/Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node/v8.h:2574:3: note: 'BooleanValue' has been
explicitly marked deprecated here
V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",
^
/Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node/v8config.hIn file included from :../fsevents.cc3\
11::629:
: In file included from note../../nan/nan.h: :197expanded:
In file included from from../../nan/nan_converters.h: 59macro:
../../nan/nan_converters_43_inl.h :'V8_DEPRECATED'40
:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use
Isolate version. declarator __attribute__((deprecated(message)))[-Wdeprecated-declarations]
^
X(bool, Boolean)
^
The real output is actually ten times longer, but I think you get the picture. How to fix this? Node version: 12.10.0. Npm version: 6.11.3.
Try this it should work.
npm install fsevents#1.2.9
I have tried this and using this versions
node -v => v12.18.0 and npm -v => 6.14.9
I got same issue, and the fix is the right node version to use with.
First time I get gyp ERR! node -v v13.3.0, then fix with nvm install v8.9.4
So I suggest to use node under nvm and try older node version!

Error when installing mod_perl2

I am trying to install mod_perl2 with below configuration: OS: CentOS release 5.5 (Final) Uname -a result: x86_64 x86_64 x86_64 GNU/Linux Perl version: v5.8.8 built for x86_64-linux-thread-multi apache version: Apache/2.2.3 I have downloaded mod_perl2 from Cpan site
when I try to run the "perl Makefile.PL MP_APXS=/usr/local/httpd/bin/apxs" it gives below output:
Subroutine set_version redefined at ./Makefile.PL line 137.
[ info] generating script t/TEST
[ info] generating script ./t/cgi-bin/cookies.pl
[ info] generating script ./t/cgi-bin/next_available_port.pl
Checking for Cwd...ok
Checking for File::Spec...ok
[ info] generating script t/TEST
Generating a Unix-style Makefile
Writing Makefile for mod_perl2
[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning]
[warning] LoadModule perl_module modules/mod_perl.so
[warning]
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.
[warning] Check the results of
[warning]
[warning] $ /usr/local/httpd/bin/apxs -q LIBEXECDIR
[warning]
[warning] and adjust the LoadModule directive accordingly.
After "make" command runs below error occurs:
modperl_env.c: In function ‘modperl_env_magic_local_all’:
modperl_env.c:544: error: ‘MGf_LOCAL’ undeclared (first use in this function)
modperl_env.c:544: error: (Each undeclared identifier is reported only once
modperl_env.c:544: error: for each function it appears in.)
modperl_env.c: At top level:
modperl_env.c:642: warning: excess elements in struct initializer
modperl_env.c:642: warning: (near initialization for ‘MP_vtbl_env’)
modperl_env.c: In function ‘modperl_env_init’:
modperl_env.c:661: warning: passing argument 2 of ‘Perl_mg_find’ discards qualifiers from pointer target type
modperl_env.c:673: warning: implicit declaration of function ‘mg_free_type’
modperl_env.c:678: error: ‘MGf_LOCAL’ undeclared (first use in this function)
modperl_env.c: In function ‘modperl_env_unload’:
modperl_env.c:690: warning: passing argument 2 of ‘Perl_mg_find’ discards qualifiers from pointer target type
make1: * [modperl_env.lo] Error 1
make1: Leaving directory `/opt/mod_perl-2.0.10/src/modules/perl'
make: * [modperl_lib] Error 2
any help is appriciated, if i have asked somthing wrong please guide further (no down votes please :) )
This constant as been introduced in perl 5.9.3, and mod_perl use it from 2.0.10.
http://search.cpan.org/~vpit/Variable-Magic-0.62/lib/Variable/Magic.pm#MGf_LOCAL
https://perl5.git.perl.org/perl.git/commit/a5063e7cd8fef802efd25ffe9df2c3748f4254f6
https://github.com/apache/mod_perl/commit/82827132efd3c2e25cc413c85af61bb63375da6e
https://perldoc.perl.org/perlguts.html
to overcome this you must modify mod_perl to use this constant conditionaly of the perl version:
diff -ruw mod_perl-2.0.11/src/modules/perl/modperl_env.c mod_perl-2.0.11.patched/src/modules/perl/modperl_env.c
--- mod_perl-2.0.11/src/modules/perl/modperl_env.c 2017-12-06 11:08:55.000000000 -0500
+++ mod_perl-2.0.11.patched/src/modules/perl/modperl_env.c 2018-03-27 15:02:14.174790000 -0400
## -541,7 +541,9 ##
nmg = sv_magicext(nsv, mg->mg_obj, mg->mg_type, &MP_vtbl_env, (char*)NULL, 0);
nmg->mg_ptr = mg->mg_ptr;
nmg->mg_flags |= MGf_COPY;
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 3)
nmg->mg_flags |= MGf_LOCAL;
+#endif
return 1;
}
## -679,7 +681,9 ##
/* Add our version instead */
mg = sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &MP_vtbl_env, (char*)NULL, 0);
mg->mg_flags |= MGf_COPY;
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 3)
mg->mg_flags |= MGf_LOCAL;
+#endif
}
void modperl_env_unload(pTHX)
A modified/enhanced version of Mathieu Carbonneaux's patch above was committed to the mod_perl SVN repository on October 8th, 2019:
http://svn.apache.org/viewvc?view=revision&revision=1868115
With this patch, mod_perl 2.0.11 will compile and install using Perl <= 5.8.8.
(Sorry, I don't have the reputation to comment, only answer.)
Why are you trying to build your own version of mod_perl? Centos has a pre-built version of mod_perl which will work with the pre-built version of Perl that is already installed.
$ sudo yum install mod_perl
(Of course, this won't help if you're not using the system Perl)
dont know how but mod_perl-2.0.6 has got installed successfully. had no success with the mod_perl-2.0.10 :(

Mongoose error when running node

When I run node server.js in terminal, I receive the following error from mongoose:
/Users/XXXX/Desktop/Projects/crud/node_modules/mongoose/node_modules/mongodb/lib/server.js:235
process.nextTick(function() { throw err; })
^
Error: connect ECONNREFUSED 127.0.0.1:27017
at Object.exports._errnoException (util.js:860:11)
at exports._exceptionWithHostPort (util.js:883:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)
I've ran npm install mongoose with a warning, but I doubt that's the reason the mongodb database isn't running. Here is the warning:
> kerberos#0.0.17 install /Users/Sean/Desktop/Projects/crud/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
CXX(target) Release/obj.target/kerberos/lib/worker.o
CC(target) Release/obj.target/kerberos/lib/kerberosgss.o
../lib/kerberosgss.c:509:13: warning: implicit declaration of function 'gss_acquire_cred_impersonate_name' is invalid in C99
[-Wimplicit-function-declaration]
maj_stat = gss_acquire_cred_impersonate_name(&min_stat,
^
1 warning generated.
CC(target) Release/obj.target/kerberos/lib/base64.o
CXX(target) Release/obj.target/kerberos/lib/kerberos_context.o
SOLINK_MODULE(target) Release/kerberos.node
It can happen when the mongodb service is not running on your machine.So start with below command it will be help you to open node server with no interrupt as well as mongodb will also run on default port.
brew services start mongodb