X-Press Publishing project: Incomplete test results

Hi, codecademy community

I’m trying to solve the capstone proyect for BUILDING A PERSISTENT API and when I reach the part for creating routes for the issues, I notice I don’t get the tests for that part when running $ npm test. I’ve looked into the test file and there are in fact test for the issue route but still they don’t show up when i run the tests. Here’s the code for the issue route I’m trying to test:

describe('POST /api/series/:seriesId/issues', function() {
  let newIssue;

  beforeEach(function(done) {
    newIssue = {
      name: 'New Issue',
      issueNumber: 3,
      publicationDate: 'January 3, 1990',
      artistId: 1
    };

    seed.seedIssueDatabase(done);
  });

  it('should create a valid issue', function(done) {
    request(app)
        .post('/api/series/2/issues')
        .send({issue: newIssue})
        .then(function() {
          testDb.all('SELECT * FROM Issue', function(error, result) {
            if (error) {
              throw new Error(error);
            }
            const issue = result.find(issue => issue.name === newIssue.name);
            expect(issue).to.exist;
            expect(issue.id).to.exist;
            expect(issue.name).to.equal(newIssue.name);
            expect(issue.issue_number).to.equal(newIssue.issueNumber);
            expect(issue.publication_date).to.equal(newIssue.publicationDate);
            expect(issue.artist_id).to.equal(newIssue.artistId);
            expect(issue.series_id).to.equal(2);
            done()
          });
        }).catch(done);
  });

  it('should return a 201 status code after issue creation', function() {
    return request(app)
        .post('/api/series/2/issues')
        .send({issue: newIssue})
        .expect(201);
  });

  it('should return the newly-created issue after issue creation', function() {
    return request(app)
        .post('/api/series/2/issues')
        .send({issue: newIssue})
        .then(function(response) {
          const issue = response.body.issue;
          expect(issue).to.exist;
          expect(issue.id).to.exist;
          expect(issue.name).to.equal(newIssue.name);
          expect(issue.issue_number).to.equal(newIssue.issueNumber);
          expect(issue.publication_date).to.equal(newIssue.publicationDate);
          expect(issue.artist_id).to.equal(newIssue.artistId);
          expect(issue.series_id).to.equal(2);
        });
  });

  it('should return a 400 status code for invalid issues', function() {
    newIssue = {
      issueNumber: 3,
      publicationDate: 'January 3, 1990',
      artistId: 1
    };

    return request(app)
        .post('/api/series/2/issues')
        .send({issue: newIssue})
        .expect(400);
  });

  it('should return a 400 status code if an artist with the issue\'s artist ID doesn\'t exist', function() {
    newIssue = {
      issueNumber: 3,
      publicationDate: 'January 3, 1990',
      artistId: 999
    };

    return request(app)
        .post('/api/series/2/issues')
        .send({issue: newIssue})
        .expect(400);
  });
});

And here’s the complete result of the tests where the issues route only has two tests for the DELETE method. Note: there are test for the Issues table but not for the routes.

MBP:~ myName$ cd /Users/myName/Documents/Development/capstone-project-1-x-press-publishing 
MBP:capstone-project-1-x-press-publishing myName$ npm test

> x-press-publishing@1.0.0 test /Users/myName/Documents/Development/capstone-project-1-x-press-publishing
> mocha



Listenening on port 8081
  Artist Table
    ✓ should exist
    ✓ should have name, date_of_birth, biography, and is_currently_employed columns with appropriate data types
    ✓ should have a required name column
    ✓ should have a required date_of_birth column
    ✓ should have a required biography column
    ✓ is_currently_employed should default to 1

  Series Table
    ✓ should exist
    ✓ should have id, name, and description columns with appropriate data types
    ✓ should have a required name column
    ✓ should have a required description column

  Issue Table
    ✓ should exist
    ✓ should have id, name, issue_number, publication_date, artist_id, and series_id columns with appropriate data types
    ✓ should have a required name column
    ✓ should have a required name column
    ✓ should have a required issue_number column
    ✓ should have a required publication_date column
    ✓ should have a required artist_id column
    ✓ should have a required series_id column

  GET /api/artists
GET /api/artists 200 4.781 ms - 242
    ✓ should return all currently-employed artists
GET /api/artists 200 1.453 ms - 242
    ✓ should return a status code of 200

  GET /api/artists/:id
GET /api/artists/2 200 1.431 ms - 127
    ✓ should return the artist with the given ID
GET /api/artists/2 200 0.843 ms - 127
    ✓ should return a 200 status code for valid IDs
GET /api/artists/999 404 0.563 ms - 9
    ✓ should return a 404 status code for invalid IDs

  POST /api/artists
POST /api/artists/ 201 3.372 ms - 127
    ✓ should create a valid artist
POST /api/artists/ 201 1.649 ms - 127
    ✓ should return a 201 status code after artist creation
POST /api/artists/ 201 1.984 ms - 127
    ✓ should return the newly-created artist after artist creation
POST /api/artists/ 201 1.757 ms - 127
    ✓ should set new artists as currently-employed by default
POST /api/artists/ 400 0.221 ms - 11
    ✓ should return a 400 status code for invalid artists

  PUT /api/artists/:id
PUT /api/artists/1 200 2.964 ms - 135
    ✓ should update the artist with the given ID
PUT /api/artists/1 200 2.916 ms - 135
    ✓ should return a 200 status code after artist update
PUT /api/artists/1 200 2.269 ms - 135
    ✓ should return the updated artist after artist update
PUT /api/artists/1 400 0.808 ms - 11
    ✓ should return a 400 status code for invalid artist updates

  DELETE /api/artists/:id
DELETE /api/artists/1 200 4.210 ms - 122
    ✓ should set the artist with the given ID as not currently-employed
DELETE /api/artists/1 200 1.773 ms - 122
    ✓ should return a 200 status code after artist delete
DELETE /api/artists/1 200 1.861 ms - 122
    ✓ should return the deleted artist after artist delete

  GET /api/series
GET /api/series 200 1.596 ms - 192
    ✓ should return all series
GET /api/series 200 0.456 ms - 192
    ✓ should return a status code of 200

  GET /api/series/:id
GET /api/series/2 200 2.336 ms - 70
    ✓ should return the series with the given ID
GET /api/series/2 200 0.448 ms - 70
    ✓ should return a 200 status code for valid IDs
GET /api/series/999 404 0.395 ms - 9
    ✓ should return a 404 status code for invalid IDs

  POST /api/series
POST /api/series/ 201 2.924 ms - 71
    ✓ should create a valid series
POST /api/series/ 201 2.210 ms - 71
    ✓ should return a 201 status code after series creation
POST /api/series/ 201 1.702 ms - 71
    ✓ should return the newly-created series after series creation
POST /api/series/ 400 0.238 ms - 11
    ✓ should return a 400 status code for invalid series

  PUT /api/series/:id
PUT /api/series/1 200 2.530 ms - 79
    ✓ should update the series with the given ID
PUT /api/series/1 200 2.252 ms - 79
    ✓ should return a 200 status code after series update
PUT /api/series/1 200 2.415 ms - 79
    ✓ should return the updated series after series update
PUT /api/series/1 400 0.736 ms - 11
    ✓ should return a 400 status code for invalid series updates

  DELETE /api/series/:id
DELETE /api/series/1 404 1.935 ms - 154
    ✓ should remove the series with the specified ID from the database if that series has no related issues
    1) "before each" hook

  GET /api/series/:seriesId/issues
    2) "before each" hook for "should return all issues of an existing series"


  49 passing (1s)
  2 failing

  1) DELETE /api/series/:id "before each" hook for "should return all issues of an existing series":
     TypeError: Cannot read property 'call' of undefined
  

  2) DELETE /api/series/:id "before each" hook for "should return all issues of an existing series":
     TypeError: Cannot read property 'call' of undefined
  



npm ERR! Test failed.  See above for more details.

I hope someone can tell me if I’m doing something wrong or if the test have a bug of some kind. Thanks in advance!

EDIT:
I just ran one of the skipped tests using mocha’s GREP option and it did run it. It returned a timeout error. Could it be related to the reason it doesn’t show up with the rest of the tests?
Here’s the terminal output:

MBP:capstone-project-1-x-press-publishing myName$ npm test -- -g 'should create a valid issue'

> x-press-publishing@1.0.0 test /Users/myName/Documents/Development/capstone-project-1-x-press-publishing
> mocha "-g" "should create a valid issue"



Listenening on port 8081
  POST /api/series/:seriesId/issues
    1) should create a valid issue


  0 passing (2s)
  1 failing

  1) POST /api/series/:seriesId/issues should create a valid issue:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  



npm ERR! Test failed.  See above for more details.
3 Likes

Same problem here…

1 Like

Hi there!

I was getting the same error and managed to solve it by writing the DELETE /api/series/:seriesId route in series.js. It seems like the error at this route is affecting the GET /api/series/:seriesId/issues testing.

After finding out that the skipped tests using GREP option (as @blameitonjoe explained above) were passing for me, I tried to copy the DELETE route from the Solution Code into the series.js and that allowed me to run the tests normally. Hope this works for you too!

PS: @Codecademy please solve this asap, these last lessons are quite hard and frustrating already without these weird bugs happening!

12 Likes

I’m having this problem, too.

Running npm test – -g ‘should return all issues of an existing series’ results in a pass, but npm test results in:

 49 passing (4s)
  2 failing

  1) DELETE /api/series/:id "before each" hook for "should return all issues of an existing series":
     TypeError: Cannot read property 'call' of undefined
      at processImmediate (internal/timers.js:439:21)

  2) DELETE /api/series/:id "before each" hook for "should return all issues of an existing series":
     TypeError: Cannot read property 'call' of undefined
      at processImmediate (internal/timers.js:439:21)

Really annoying - especially as I’m paying for this!

6 Likes

i am having problem with npm test,none of the test are passing ,i have checked my code it is correct

same issue here, did you find some solution?

I am having the same problems and be honest it is not motivating at all not to be able to see any results on your work. Personally, I changed to an older version of Node as suggested and that got me through some of the issues but some tests were still not passing.
In the end I found all this messing around with different versions and all that simply too time consuming and completed the exercise without being able to fully test it.
I honestly agree with everyone here that Codecademy should pay more attention to issues like this and update where necessary (I have come across other similar issues on different projects on this platform). I understand that keeping up with all the software version changes all the time can be difficult but we’re paying to use this platform and should be able to complete projects that are up to date.

5 Likes

Honestly this is ridiculous. First the dependancies wouldn’t install properly because this project is from 2017 and now I can’t even complete the project because the final tests within the test suite wont work…clearly nothing has been done about this over several months, I think I’m going to try get in touch with Codecademy and direct them to this thread and others like it to try get some results (results being the project being updated and rid of issues).

3 Likes

I’ve found a quick workaround - if you comment out the DELETE Series tests in test.js it should then continue to the rest of the tests. You can then undo this when you need to test that section again.

6 Likes

I’m having a similar issue and at this point I’m just going to give up on the project until it’s fixed. I agree with other commenters that it’s ridiculous to be paying for these projects that are out of date.

Commenting out the Series Delete test worked for me too. Thanks.

X-Press Publishing project: Incomplete test results SOLVED

  1. To run the app, you’ll need to trash the Codecademy skeleton code. IMHO, Delete it completely.

  2. Then get the solution code and install it twice. A) once as is so you have a solution to view if you must, and B) the Second time but change the name. So, you have a copy to play around, code, and learn.
    For example, my files are named “Solution” and “Ricks” to tell them apart.
    The above instructions will give you a solution file and a base/skeleton file updated as of Sept 2020. Remember, the existing skeleton contains outdated node dependencies and will cause exercise 2 and 48 failures during npm testing.

  3. Finally, go into your “copy” (RICKS in my case) and remove the contents of the api file. You will rebuild them in this exercise
    api.js
    artist.js
    issues.js
    series.js

  4. remove the server.js file as well. You will be rebuilding this file in the exercise.

So as you can see, the lesson is about CRUD and all the Express related topics from the prior exercises.
Hence by rebuilding the API folder and contents (four files. i.e., api, artist, issues, series) as well as the server.js file
you get exposure and some repetition to CRUD coding for Express.

ALTERNATIVELY,
You can try to update the dependencies yourself. That is beyond the scope of this lesson. However, in real life, you would have to search for solutions, and some challenges in real life will be even more formidable. Notwithstanding, you should crawl before you walk. Thus, even if you update the dependencies yourself, exercise 48 may still be frustrating because the software will not bypass the DELETE /api/series/:id Test. So you will have to also go into your test.js file and comment out the DELETE test until you are ready to test for the DELETE /api/series/:id. If you are relatively new to coding, take my advice (crawl first), import the solution code, and remove the folder/files listed above. The Solution code will work. Just remember after step 47, skip to 52 & 53 and write the DELETE code, then go back to 48, and your test for getting/api/series/:seriesId/issues should run. It worked for me.

Dirty Little Secret,
You can compare your code in VSCode side by side and use the “compare” feature. Right click on any file (not folder) to “select for compare” and inspect your code next to the answer file (right click a second time on the answer file and click “Compare with selected”). VSCode will highlight the differences. You should rarely use this unless you are totally stuck. If you look at the solution frequently, it’s a sign IMHO, that you are not ready for real-world applications. Before you use this naughty trick, sleep on your work overnight or at least take a short break. This was the advice given to me, and it has helped me countless times. Your mind can play tricks on your eyes. If you say “I don’t see it” and “my code is perfect” and “The solution is exactly what I have,” your mind will tell your eyes to stop spotting the problem. Take a break and say, “when I get back, I’ll get one step closer and perhaps even find the solution,” and your mind will help you “see” with your eyes.

2 Likes

Did you make it through the project. See my workaround if not. I’ve posted it as a reply to the original post by blameitonjoe.


Best
Rick

Did you resolve your struggles with X-press Publishing project. If not I’ve written a response with a workaround.


Best
Rick

Hi everyone!

I do agree with a lot of commentors about the un-indated projects as I have had many of these issues myself! I dont know if its CodeCademys way of forcing us to research the issues and become more independent??

Although i dont believe the teachings are enough to prepare us for handling these errors! Teach us how to attack these problems before forcing us into these problems!

Anyways like a few above have mentioned – If you add your seriesRouter.delete() code at the bottom of your series.js file and then run npm test you will pass the relevant GET :seriesId/issues test!

If you need help writing the logic you can download the solution code in the syllabus.

Hope this works for you! Happy coding.

1 Like

I need help. After “npm install” should be so much errors? Because i skipped previous project because of same situation. and here’s we go again. I used mr. peacefulrick tip to solve this problem. but it’s still there.

npm install
npm WARN deprecated babel-preset-es2015@6.24.1: :raised_hands: Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated babel@6.23.0: In 6.x, the babel package has been deprecated in favor of babel-cli. Check https://opencollective.com/babel to support the Babel maintainers
npm WARN deprecated urix@0.1.0: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
npm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated resolve-url@0.2.1: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (ReDos Vulnerability Regression Visibility Notice · Issue #797 · visionmedia/debug · GitHub)
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated core-js@1.2.7: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path C:\Projects\capstoneBegin\node_modules\sqlite3
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Users\kenta\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Projects\capstoneBegin\node_modules\sqlite3\lib\binding\node-v88-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Projects\capstoneBegin\node_modules\sqlite3\lib\binding\node-v88-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v88’ (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.11.0
npm ERR! node-pre-gyp info using node@15.5.1 | win32 | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for “C:\Projects\capstoneBegin\node_modules\sqlite3\lib\binding\node-v88-win32-x64\node_sqlite3.node” (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v88-win32-x64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v88-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v88-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@15.5.1 (node-v88 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v88-win32-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.5.1 | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.5.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.5 found at “C:\Users\kenta\AppData\Local\Programs\Python\Python39\python.exe”
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with ‘–loglevel silly’ for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the “Desktop development with C++” workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS GitHub - nodejs/node-gyp: Node.js native addon build tool
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\kenta\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Users\kenta\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\kenta\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Users\kenta\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Users\kenta\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Users\kenta\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\kenta\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:340:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:376:20)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1063:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\kenta\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “configure” “–fallback-to-build” “–module=C:\Projects\capstoneBegin\node_modules\sqlite3\lib\binding\node-v88-win32-x64\node_sqlite3.node” “–module_name=node_sqlite3” “–module_path=C:\Projects\capstoneBegin\node_modules\sqlite3\lib\binding\node-v88-win32-x64” “–napi_version=7” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v88”
npm ERR! gyp ERR! cwd C:\Projects\capstoneBegin\node_modules\sqlite3
npm ERR! gyp ERR! node -v v15.5.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Users\kenta\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Projects\capstoneBegin\node_modules\sqlite3\lib\binding\node-v88-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Projects\capstoneBegin\node_modules\sqlite3\lib\binding\node-v88-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v88’ (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (C:\Projects\capstoneBegin\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:376:20)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1063:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19042
npm ERR! node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Projects\capstoneBegin\node_modules\node-pre-gyp\bin\node-pre-gyp” “install” “–fallback-to-build”
npm ERR! node-pre-gyp ERR! cwd C:\Projects\capstoneBegin\node_modules\sqlite3
npm ERR! node-pre-gyp ERR! node -v v15.5.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kenta\AppData\Local\npm-cache_logs\2021-05-28T22_40_02_698Z-debug.log

I am not sure it’s the problem for you but make sure you have node installed before running npm install. Go to the directory where you tried installing with npm install and run node -v. This should give you the node version that you have installed if it is properly installed. If not, follow node installation instructions for your environment. There could be a few error messages related to project being developed with an earlier node version and now you have a later one, some packages have been updated and similar. But I don’t think you should have that many.

Node installed.

node -v
v15.5.1

Well, I trying to find solution. I installed Visual Studio with recommended parts. anyway, everything is broken for me. i can’t launch almost any command. for example.

npm cache clean --f
npm WARN using --force Recommended protections disabled.

npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@7.2.2: wanted {“os”:"!win32"} (current: {“os”:“win32”,“arch”:“x64”})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: undefined
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kenta\AppData\Local\npm-cache_logs\2021-05-29T16_35_24_887Z-debug.log

everything was installed by guides on Codecademy, and everything was working ok. I’m doing lessons everyday.

for example, trying to update NODE gives me error now.

npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@7.2.2: wanted {“os”:"!win32"} (current: {“os”:“win32”,“arch”:“x64”})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: undefined
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kenta\AppData\Local\npm-cache_logs\2021-05-29T16_35_24_887Z-debug.log

jesus christ. looks like reinstalling Node from website fixed this.
atleast no more errors, only alot of warnings. but that’s progress.