frontendmasters / api-design-node-v3 Goto Github PK
View Code? Open in Web Editor NEW[Course] API design in Node with Express v3
Home Page: https://frontendmasters.com/courses/api-design-nodejs-v3/
[Course] API design in Node with Express v3
Home Page: https://frontendmasters.com/courses/api-design-nodejs-v3/
I have installed yarn using yarn install
and checked it was successful using yarn version
. I then use yarn dev
within the CLI of visual studio, to build the project and start the server.
I then try to run yarn test-routes
to check my code against the test criteria (at this stage I haven't written any code, but I have the lesson 2 directory open in VS code, I just want to check the test is working), but receive the following error:
'Connors-MBP:api-design-node-v3-lesson-2 connorflewitt$ yarn test-routes
yarn run v1.22.15
$ npm run test -t router
npm WARN lifecycle The node binary used for scripts is /var/folders/x1/mz8mq97502566d0vm7_148d40000gn/T/yarn--1634049615107-0.4726967466122134/node but npm is using /usr/local/bin/node itself. Use the --scripts-prepend-node-path option to include the path for the node binary npm was executed with.
[email protected] test /Users/connorflewitt/Documents/Learning Resources/api-design-node-v3-master/api-design-node-v3-lesson-2
cross-env NODE_ENV=testing jest --forceExit --detectOpenHandles --silent "router"
sh: cross-env: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] test: cross-env NODE_ENV=testing jest --forceExit --detectOpenHandles --silent "router"
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] test 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:
npm ERR! /Users/connorflewitt/.npm/_logs/2021-10-12T14_40_15_531Z-debug.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. '
Is anyone able to recreate and/or solve this issue?
As mentioned previously on #40 some async tests take longer than expected to run causing the test suite to timeout. THis can be fixed by adding the line jest.setTimeout(10000)
anywhere to the test-db-setup.js
file
Deprecation Warning:
Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths.
Please update your configuration.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
FAIL src/resources/item/tests/item.router.spec.js
● Test suite failed to run
Route.get() requires a callback function but got a [object Undefined]
7 | router
8 | .route('/')
9 | .get(controllers.getOne)
| ^
10 | .post(controllers.createOne)
11 |
12 | // /api/item/:id
at Route.get (node_modules/express/lib/router/route.js:202:15)
at Object. (src/resources/item/item.router.js:9:4)
at Object. (src/resources/item/tests/item.router.spec.js:1:1)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 2.175s, estimated 4s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:NODE_ENV=testing jest --forceExit --detectOpenHandles --silent "router"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test 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:
npm ERR! /Users/jay/.npm/_logs/2019-11-26T15_24_45_112Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test-routes:npm run test -t router
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test-routes 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:
npm ERR! /Users/jay/.npm/_logs/2019-11-26T15_24_45_145Z-debug.log
api-design-node-v3/src/utils/crud.js
Line 80 in ca8e738
The above was causing Circular Reference Problem, so I had to change it to
return res.status(OK).json({ data: 'removed'})
by not sending the object removed. I don't know what is the reason?
If you're running into this issue on windows, install the win-node-env npm module.
This will help setting the environment variables correctly and yarn test-routes
won't quit silently.
Hey there Im doing the lesson-2 test of the course. When i run the tests with the given command i get the error saying MongoDBConnect Error and it sayd item route > has crud routes failed even though that test should pass and it says connection refused.
MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017
at connectionFailureError (node_modules/mongodb/lib/core/connection/connect.js:340:14)
at Socket. (node_modules/mongodb/lib/core/connection/connect.js:310:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 27017
}]
at Pool. (node_modules/mongodb/lib/core/topologies/server.js:438:11)
at node_modules/mongodb/lib/core/connection/pool.js:562:14
at node_modules/mongodb/lib/core/connection/pool.js:995:11
at node_modules/mongodb/lib/core/connection/connect.js:32:7
at callback (node_modules/mongodb/lib/core/connection/connect.js:280:5)
at Socket. (node_modules/mongodb/lib/core/connection/connect.js:310:7)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 2.279s, estimated 3s
When following along, my tests didn't pass for lesson 2. It was a small exercise - so, I checked the solution and everything was correct. I made sure I pulled dependencies sense there are a few things added in-between each step. Then I switched to the solution branch pulled dependencies / and ran the tests - but they didn't pass there either.
I'm not sure why it would be interacting with a database yet (at exercise 2) (so that shouldn't matter) - but I got some errors related to Mongo and wondering how that might fit in.
I tried both - yarn test-routes
and npm run test-routes
commands in case there was a discrepancy.
I jumped between a few lessons and they didn't pass either.
Am I doing something wrong? Or has something changed - that I don't know about?
RECREATE: pull lesson-2-solution
: update dependencies: run tests
.get(controllers.getOne)
> getOne
type functions aren't written in the controller - so, that fails for each verb. Adding them / or just tossing in a callback solves for those -
but then:
(node:9940) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'dropDatabase' of undefined
(node:9940) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:9940) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
FAIL src/resources/item/tests/item.router.spec.js
item router
✕ has crud routes (80ms)
● item router › has crud routes
MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: getaddrinfo ENOTFOUND localhost localhost:27017]
at Pool.<anonymous> (node_modules/mongodb-core/lib/topologies/server.js:564:11)
at Connection.<anonymous> (node_modules/mongodb-core/lib/connection/pool.js:317:12)
at Socket.<anonymous> (node_modules/mongodb-core/lib/connection/connection.js:246:50)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
yarn install fails with
error https://registry.yarnpkg.com/flatmap-stream/-/flatmap-stream-0.1.2.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
no problems with npm though
also see #1
in
package.json
file, I found express is using version 4.x, that's very confused me!
Maybe, it means the tutorials version 3?
https://github.com/FrontendMasters/api-design-node-v3/blob/master/package.json
// "express": "^4.16.4",
I just clone this repo and tried to install all the dependencies as mentioned in the package.json file but it did not work for me!
This repo is totally outdated. Please do something about it. Lesson 3 ,4 and 5 have no tests. Code on repo is different than code on video. Please do something about it. Fix this issues otherwise dont provide this course at all. Thanks
$ npm run test-routes
[email protected] test-routes C:\Users\tyrone\Desktop\FEM-API\api-design-node-v3
npm run test -t router
[email protected] test C:\Users\tyrone\Desktop\FEM-API\api-design-node-v3> NODE_ENV=testing jest --forceExit --detectOpenHandles --silent "router"
FAIL src/resources/item/tests/item.router.spec.js
● Test suite failed to run
Cannot find module 'C:\Users\tyrone\Desktop\FEM-API\api-design-node-v3\node_modules\bcrypt\lib\binding\bcrypt_lib.node' from 'bcrypt.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:221:17)
at Object.<anonymous> (node_modules/bcrypt/bcrypt.js:6:16)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.972s
Note: This command was run via npm module 'win-node-env'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: NODE_ENV=testing jest --forceExit --detectOpenHandles --silent "router"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test 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:
npm ERR! C:\Users\tyrone\AppData\Roaming\npm-cache_logs\2020-01-23T14_35_37_508Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test-routes: npm run test -t router
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test-routes 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:
npm ERR! C:\Users\tyrone\AppData\Roaming\npm-cache_logs\2020-01-23T14_35_37_672Z-debug.log
[email protected] test-routes
npm run test -t router
[email protected] test
cross-env NODE_ENV=testing jest --forceExit --detectOpenHandles --silent "router"
RUNS src/resources/item/tests/item.router.spec.js
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "TypeError: Cannot read properties of undefined (reading 'dropDatabase')".] {
code: 'ERR_UNHANDLED_REJECTION'
}
on initial installation [npm i ] or [yarn install] the (bcrypt) package is causing the installation process to fail.
however, installing it on a separate line yeilds with 1926 vulnerabilities:
w:\devp\node\api-design-node-v3\node_modules\nan\nan_converters_43_inl.h(22): warning C4996: 'v8::Value::ToBoolean': was declared deprecated (compiling source file ..\src\bcrypt_node.cc) [W:\devp\node\api-design-node-v3\node_modules \bcrypt\build\bcrypt_lib.vcxproj] c:\users\freetw\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(2663): note: see declaration of 'v8::Value: :ToBoolean' (compiling source file ..\src\bcrypt_node.cc) w:\devp\node\api-design-node-v3\node_modules\nan\nan_converters_43_inl.h(40): warning C4996: 'v8::Value::BooleanValu e': was declared deprecated (compiling source file ..\src\bcrypt_node.cc) [W:\devp\node\api-design-node-v3\node_modu les\bcrypt\build\bcrypt_lib.vcxproj] c:\users\freetw\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(2701): note: see declaration of 'v8::Value: :BooleanValue' (compiling source file ..\src\bcrypt_node.cc) w:\devp\node\api-design-node-v3\node_modules\nan\nan_implementation_12_inl.h(356): error C2660: 'v8::StringObject::N ew': function does not take 1 arguments (compiling source file ..\src\bcrypt_node.cc) [W:\devp\node\api-design-node- v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] c:\users\freetw\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(5531): note: see declaration of 'v8::String Object::New' (compiling source file ..\src\bcrypt_node.cc) w:\devp\node\api-design-node-v3\node_modules\nan\nan_implementation_12_inl.h(356): error C2059: syntax error: ')' (c ompiling source file ..\src\bcrypt_node.cc) [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vc xproj] w:\devp\node\api-design-node-v3\node_modules\nan\nan_object_wrap.h(24): error C2039: 'IsNearDeath': is not a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [W:\devp\node\api-design-node-v3\node_modules\bc rypt\build\bcrypt_lib.vcxproj] with [ T=v8::Object ] (compiling source file ..\src\bcrypt_node.cc) w:\devp\node\api-design-node-v3\node_modules\nan\nan.h(1920): note: see declaration of 'Nan::Persistent<v8::Object ,v8::NonCopyablePersistentTraits<T>>' with [ T=v8::Object ] (compiling source file ..\src\bcrypt_node.cc) w:\devp\node\api-design-node-v3\node_modules\nan\nan_object_wrap.h(127): error C2039: 'IsNearDeath': is not a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [W:\devp\node\api-design-node-v3\node_modules\b crypt\build\bcrypt_lib.vcxproj] with [ T=v8::Object ] (compiling source file ..\src\bcrypt_node.cc) w:\devp\node\api-design-node-v3\node_modules\nan\nan.h(1920): note: see declaration of 'Nan::Persistent<v8::Object ,v8::NonCopyablePersistentTraits<T>>' with [ T=v8::Object ] (compiling source file ..\src\bcrypt_node.cc) w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(66): error C2664: 'v8::String::Utf8Value::Utf 8Value(const v8::String::Utf8Value &)': cannot convert argument 1 from 'v8::Local<v8::String>' to 'const v8::String: :Utf8Value &' [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(66): note: Reason: cannot convert from 'v8: :Local<v8::String>' to 'const v8::String::Utf8Value' w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(66): note: No user-defined-conversion opera tor available that can perform this conversion, or the operator cannot be called w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(121): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(121): error C2789: 'minor_ver': an object of const-qualified type must be initialized [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxpr oj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(121): note: see declaration of 'minor_ver' w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(150): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(150): error C2789: 'minor_ver': an object of const-qualified type must be initialized [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxpr oj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(150): note: see declaration of 'minor_ver' w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(212): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(212): error C2512: 'Nan::Utf8String::Utf8Stri ng': no appropriate default constructor available [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_ lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(213): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(213): error C2512: 'Nan::Utf8String::Utf8Stri ng': no appropriate default constructor available [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_ lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(231): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(231): error C2512: 'Nan::Utf8String::Utf8Stri ng': no appropriate default constructor available [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_ lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(232): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(232): error C2512: 'Nan::Utf8String::Utf8Stri ng': no appropriate default constructor available [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_ lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(312): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(312): error C2512: 'Nan::Utf8String::Utf8Stri ng': no appropriate default constructor available [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_ lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(313): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(313): error C2512: 'Nan::Utf8String::Utf8Stri ng': no appropriate default constructor available [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_ lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(331): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(331): error C2512: 'Nan::Utf8String::Utf8Stri ng': no appropriate default constructor available [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_ lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(332): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(332): error C2512: 'Nan::Utf8String::Utf8Stri ng': no appropriate default constructor available [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_ lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(352): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_lib.vcxproj] w:\devp\node\api-design-node-v3\node_modules\bcrypt\src\bcrypt_node.cc(352): error C2512: 'Nan::Utf8String::Utf8Stri ng': no appropriate default constructor available [W:\devp\node\api-design-node-v3\node_modules\bcrypt\build\bcrypt_ lib.vcxproj] gyp ERR! build error gyp ERR! stack Error:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:311:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=W:\\devp\\node\\api-design-node-v3\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=W:\\devp\\node\\api-design-node-v3\\node_modules\\bcrypt\\lib\\binding" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72" gyp ERR! cwd W:\devp\node\api-design-node-v3\node_modules\bcrypt gyp ERR! node -v v12.16.1 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=W:\devp\node\api-design-node-v3\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=W:\devp\node\api-design-node-v3\node_modules\bcrypt\lib\binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (W:\devp\node\api-design-node-v3\node_modules\bcrypt\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:311:20) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) node-pre-gyp ERR! System Windows_NT 10.0.18362 node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "W:\\devp\\node\\api-design-node-v3\\node_modules\\bcrypt\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd W:\devp\node\api-design-node-v3\node_modules\bcrypt node-pre-gyp ERR! node -v v12.16.1 node-pre-gyp ERR! node-pre-gyp -v v0.12.0 node-pre-gyp ERR! not ok
Yarn run ends with error. I can use this repo at all.
../fsevents.cc:85:16: error: variable has incomplete type 'void'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
^
../fsevents.cc:85:31: error: no member named 'Handle' in namespace 'v8'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
~~~~^
../fsevents.cc:85:48: error: expected '(' for function-style cast or type construction
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
~~~~~~~~~~^
../fsevents.cc:85:50: error: use of undeclared identifier 'exports'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
^
../fsevents.cc:85:58: error: expected ';' after top level declarator
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
^
;
23 warnings and 11 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:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/usr/local/Cellar/node/12.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents
gyp ERR! node -v v12.8.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/12.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:203:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/12.8.0/bin/node" "/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents
node-pre-gyp ERR! node -v v12.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/12.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
> [email protected] install /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v72-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../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(isolate->GetCurrentContext()) \
^
<scratch space>:208:1: note: expanded from here
ToBoolean
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2530:3: note: 'ToBoolean' has been explicitly marked deprecated here
V8_DEPRECATED("ToBoolean can never throw. Use Local version.",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
return val->NAME ## Value(isolate->GetCurrentContext()); \
^
<scratch space>:215:1: note: expanded from here
BooleanValue
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2568:3: note: 'BooleanValue' has been explicitly marked deprecated here
V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
return v8::StringObject::New(value).As<v8::StringObject>();
~~~~~~~~~~~~~~~~~~~~~ ^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:5388:3: note: 'New' declared here
static Local<Value> New(Isolate* isolate, Local<String> value);
^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
return v8::StringObject::New(value).As<v8::StringObject>();
~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
return v8::StringObject::New(value).As<v8::StringObject>();
^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
assert(persistent().IsNearDeath());
~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
assert(wrap->handle_.IsNearDeath());
~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
../src/bcrypt_node.cc:66:21: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value value(str);
^ ~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3009:5: note: candidate constructor not viable: no known conversion from 'Local<v8::String>' to
'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&) = delete;
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3002:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
^
../src/bcrypt_node.cc:121:51: error: no matching member function for call to 'ToString'
const char minor_ver = ToCharVersion(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:150:51: error: no matching member function for call to 'ToString'
const char minor_ver = ToCharVersion(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:212:35: error: no matching member function for call to 'ToString'
Nan::Utf8String data(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:213:35: error: no matching member function for call to 'ToString'
Nan::Utf8String salt(info[1]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:231:35: error: no matching member function for call to 'ToString'
Nan::Utf8String data(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:232:35: error: no matching member function for call to 'ToString'
Nan::Utf8String salt(info[1]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:312:36: error: no matching member function for call to 'ToString'
Nan::Utf8String input(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:313:40: error: no matching member function for call to 'ToString'
Nan::Utf8String encrypted(info[1]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:331:33: error: no matching member function for call to 'ToString'
Nan::Utf8String pw(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:332:35: error: no matching member function for call to 'ToString'
Nan::Utf8String hash(info[1]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:352:35: error: no matching member function for call to 'ToString'
Nan::Utf8String hash(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments
were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments
were provided
Local<String> ToString(Isolate* isolate) const);
^
2 warnings and 17 errors generated.
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.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:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/usr/local/Cellar/node/12.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt
gyp ERR! node -v v12.8.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/12.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:203:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/12.8.0/bin/node" "/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt
node-pre-gyp ERR! node -v v12.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/12.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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:
npm ERR! /Users/palkarth/.npm/_logs/2019-08-15T10_43_42_065Z-debug.log
➜ api-design-node-v3 git:(master) ✗ git checkout lesson-1
Switched to branch 'lesson-1'
Your branch is up to date with 'origin/lesson-1'.
➜ api-design-node-v3 git:(lesson-1) ✗ yarn install
yarn install v1.17.3
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > [email protected]" has unmet peer dependency "sinon@>= 5".
[4/4] 🔨 Building fresh packages...
[1/3] ⠄ bcrypt
[2/3] ⠄ fsevents
error /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding/bcrypt_lib.node" (not found)
node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v72-darwin-x64-unknown.tar.gz
node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v72-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v72-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v72-darwin-x64-unknown.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 2.7.10 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/usr/local/Cellar/node/12.8.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/12.8.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/palkarth/Library/Caches/node-gyp/12.8.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/12.8.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/palkarth/Library/Caches/node-gyp/12.8.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../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(isolate->GetCurrentContext()) \
^
<scratch space>:208:1: note: expanded from here
ToBoolean
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2530:3: note: 'ToBoolean' has been explicitly marked deprecated here
V8_DEPRECATED("ToBoolean can never throw. Use Local version.",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
return val->NAME ## Value(isolate->GetCurrentContext()); \
^
<scratch space>:215:1: note: expanded from here
BooleanValue
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2568:3: note: 'BooleanValue' has been explicitly marked deprecated here
V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
return v8::StringObject::New(value).As<v8::StringObject>();
~~~~~~~~~~~~~~~~~~~~~ ^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:5388:3: note: 'New' declared here
static Local<Value> New(Isolate* isolate, Local<String> value);
^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
return v8::StringObject::New(value).As<v8::StringObject>();
~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
return v8::StringObject::New(value).As<v8::StringObject>();
^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
assert(persistent().IsNearDeath());
~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
assert(wrap->handle_.IsNearDeath());
~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
../src/bcrypt_node.cc:66:21: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value value(str);
^ ~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3009:5: note: candidate constructor not viable: no known conversion from 'Local<v8::String>' to 'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&) = delete;
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3002:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
^
../src/bcrypt_node.cc:121:51: error: no matching member function for call to 'ToString'
const char minor_ver = ToCharVersion(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:150:51: error: no matching member function for call to 'ToString'
const char minor_ver = ToCharVersion(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:212:35: error: no matching member function for call to 'ToString'
Nan::Utf8String data(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:213:35: error: no matching member function for call to 'ToString'
Nan::Utf8String salt(info[1]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:231:35: error: no matching member function for call to 'ToString'
Nan::Utf8String data(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:232:35: error: no matching member function for call to 'ToString'
Nan::Utf8String salt(info[1]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:312:36: error: no matching member function for call to 'ToString'
Nan::Utf8String input(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:313:40: error: no matching member function for call to 'ToString'
Nan::Utf8String encrypted(info[1]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:331:33: error: no matching member function for call to 'ToString'
Nan::Utf8String pw(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:332:35: error: no matching member function for call to 'ToString'
Nan::Utf8String hash(info[1]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../src/bcrypt_node.cc:352:35: error: no matching member function for call to 'ToString'
Nan::Utf8String hash(info[0]->ToString());
~~~~~~~~~^~~~~~~~
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2535:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2551:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
2 warnings and 17 errors generated.
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.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/Cellar/node/12.8.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/usr/local/Cellar/node/12.8.0/bin/node" "/usr/local/Cellar/node/12.8.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt
gyp ERR! node -v v12.8.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:203:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/12.8.0/bin/node" "/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt
node-pre-gyp ERR! node -v v12.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp build --fallback-to-build --module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/bcrypt/lib/binding --napi_versi
warning Error running install script for optional dependency: "/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp info check checked for \"/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 2.7.10 found at \"/usr/bin/python\"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/usr/local/Cellar/node/12.8.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/12.8.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/palkarth/Library/Caches/node-gyp/12.8.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/12.8.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/palkarth/Library/Caches/node-gyp/12.8.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../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(isolate->GetCurrentContext()) \\\n ^
<scratch space>:208:1: note: expanded from here
ToBoolean
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2530:3: note: 'ToBoolean' has been explicitly marked deprecated here
V8_DEPRECATED(\"ToBoolean can never throw. Use Local version.\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
return val->NAME ## Value(isolate->GetCurrentContext()); \\\n ^
<scratch space>:215:1: note: expanded from here
BooleanValue
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:2568:3: note: 'BooleanValue' has been explicitly marked deprecated here
V8_DEPRECATED(\"BooleanValue can never throw. Use Isolate version.\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
return v8::StringObject::New(value).As<v8::StringObject>();
~~~~~~~~~~~~~~~~~~~~~ ^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:5388:3: note: 'New' declared here
static Local<Value> New(Isolate* isolate, Local<String> value);
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
return v8::StringObject::New(value).As<v8::StringObject>();
~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
return v8::StringObject::New(value).As<v8::StringObject>();
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
assert(persistent().IsNearDeath());
~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
assert(wrap->handle_.IsNearDeath());
~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
../fsevents.cc:50:32: error: no template named 'Handle' in namespace 'v8'
static void Initialize(v8::Handle<v8::Object> exports);
~~~~^
../fsevents.cc:63:6: warning: field 'async_resource' will be initialized after field 'lockStarted' [-Wreorder]
: async_resource(\"fsevents:FSEvents\"), lockStarted(false) {
^
In file included from ../fsevents.cc:82:
../src/constants.cc:89:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagNone\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagNone));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:90:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagMustScanSubDirs\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMustScanSubDirs));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:91:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagUserDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUserDropped));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:92:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagKernelDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagKernelDropped));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:93:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagEventIdsWrapped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagEventIdsWrapped));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:94:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagHistoryDone\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagHistoryDone));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:95:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagRootChanged\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagRootChanged));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:96:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagMount\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMount));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:97:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagUnmount\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUnmount));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:98:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemCreated\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemCreated));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:99:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemRemoved\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemRemoved));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:100:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemInodeMetaMod\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemInodeMetaMod));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:101:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemRenamed\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemRenamed));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:102:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemModified\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemModified));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:103:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemFinderInfoMod\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemFinderInfoMod));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:104:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemChangeOwner\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemChangeOwner));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:105:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemXattrMod\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemXattrMod));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:106:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemIsFile\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsFile));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:107:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemIsDir\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsDir));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:108:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemIsSymlink\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsSymlink));
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8.h:3365:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/palkarth/Library/Caches/node-gyp/12.8.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
../fsevents.cc:85:16: error: variable has incomplete type 'void'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
^
../fsevents.cc:85:31: error: no member named 'Handle' in namespace 'v8'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
~~~~^
../fsevents.cc:85:48: error: expected '(' for function-style cast or type construction
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
~~~~~~~~~~^
../fsevents.cc:85:50: error: use of undeclared identifier 'exports'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
^
../fsevents.cc:85:58: error: expected ';' after top level declarator
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
^
;
23 warnings and 11 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/Cellar/node/12.8.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command \"/usr/local/Cellar/node/12.8.0/bin/node\" \"/usr/local/Cellar/node/12.8.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64\" \"--napi_version=4\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents
gyp ERR! node -v v12.8.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:203:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command \"/usr/local/Cellar/node/12.8.0/bin/node\" \"/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents
node-pre-gyp ERR! node -v v12.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp build --fallback-to-build --module=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/palkarth/Documents/MSD/Technical/Source/api-design-node-v3/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)"
info This module is OPTIONAL, you can safely ignore this error
npm install output:
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Hi there, in branches lesson-1
to lesson-3
and their solution
branches the test script commands in package.json
(test-routes
, test-models
, test-controllers
...) use npm run test
while branches lesson-4
, lesson-5
and their solution
branches use yarn test
.
Shouldn't the test scripts usage of npm
or yarn
be consistent across branches? should they all use npm
since users are more likely to have npm
installed than yarn
?
If the decision is made to stick with yarn
it would be helpful to note in the README
that yarn
is required and not only suggested.
Also as it currently stands - in the branches that use yarn
to run the tests the README
suggests using npm run test-*
which simply wouldn't work for a user that didn't install yarn
(like me 🙃), example attached -
https://github.com/FrontendMasters/api-design-node-v3/tree/lesson-4#controllers
I'd be happy to submit a pull request with updates to the package.json
file across branches.
EDIT:
As I keep going through the course I'll add more points on issues I see if that's helpful & fine with you -
In the crud.spec.js
tests the test's name is 404 if no doc was found
but the actual assertion is expect(status).toBe(400)
In my opinion this should be asserted against 404
since the request wasn't misunderstood by the server but rather the resource wasn't found, would that be correct?
EDIT 2:
On the "Sign up with JWT Solution" video there's a bug with the "creates user and sends new token from user"
test if your signup route calls res.status().send()
without returning it. In the video Scott just adds the return
keyword but I think there's an important lesson to be taught here about async functions returning everything as a promise and an implicit return of undefined.
Since there was no return
statement it had returned a promise that resolved immediately to undefined which caused the test block to end & drop the database before the user was fetched. This could be a real gem of an explanation to someone watching the course.
I want to follow along but I am getting an error when running the command yarn dev
after installed all dependencies
error message:
"internal/modules/cjs/loader.js:983
throw err;
^
Error: Cannot find module 'C:\Users\alilo\Documents\Node\api-design-node-v3\node_modules\bcrypt\lib\binding\bcrypt_lib.node'"
what am I missing?
During my challenges i get.
I do have downgrade my node to 8, without that i wouldn't install and change some yarn call to node, because i don't have yarn.
I may have miss some configuration, but from what i understood, the connection to the db wasn't affecting the test, so it's a bit weird.
when i test i have
`
cross-env NODE_ENV=testing jest --forceExit --detectOpenHandles --silent "controllers"
(node:25710) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'dropDatabase' of undefined
(node:25710) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:25710) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]
`
when i try to dev, it delete my build package so i have a
rror: Cannot find module 'RELATIVEPATHOFMYDESKTOP/api-design-node-v3/dist/index.js' at Function.Module._resolveFilename (module.js:548:15) at Function.Module._load (module.js:475:25) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start:
node dist/index.jsnpm ERR! Exit status 1 npm ERR!
if i try to run build then start i have
`
{ MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]
at Pool. (/Users/jocelinqueau/Desktop/Dev/frontendMasters/api-design-node-v3/node_modules/mongodb-core/lib/topologies/server.js:564:11)
at emitOne (events.js:116:13)
at Pool.emit (events.js:211:7)
at Connection. (/Users/jocelinqueau/Desktop/Dev/frontendMasters/api-design-node-v3/node_modules/mongodb-core/lib/connection/pool.js:317:12)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at Connection.emit (events.js:214:7)
at Socket. (/Users/jocelinqueau/Desktop/Dev/frontendMasters/api-design-node-v3/node_modules/mongodb-core/lib/connection/connection.js:246:50)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:73:8)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
name: 'MongoNetworkError',
errorLabels: [ 'TransientTransactionError' ],
[Symbol(mongoErrorContextSymbol)]: {} }
`
When running npm run test-models during lesson-3, there are issues with the MongoDB connection. There was nothing going over any configuration for MongoDB for this exercise. Even the solution branch fails the tests because of the mongo connection.
MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]
at Pool.<anonymous> (node_modules/mongodb-core/lib/topologies/server.js:564:11)
at Connection.<anonymous> (node_modules/mongodb-core/lib/connection/pool.js:317:12)
at Socket.<anonymous> (node_modules/mongodb-core/lib/connection/connection.js:246:50)
I am traying to execute node item.controllers.js
and throws error:
`D:\CURSOS\FRONTEND MASTERS\API DESIGN IN NODE.JS\api-design-node-v3\src\resources\item\item.controllers.js:2
import { Item } from './item.model'
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:988:16)
at Module._compile (internal/modules/cjs/loader.js:1036:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47`
I tried putting type: module
on package.json without success, also trying to run it from 'dist'
folder, please somebody can help me.
My current node version is v14.17.5
On windows, I edited the test-db-setup.js file and also the dev.js and testing.js files contained in the config folder.
I changed all the instances of mongodb://localhost:27017
to mongodb://0.0.0.0:27017
I got this from a stackoverflow answer, specifically the second answer.
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.