X-Press Publishing Project. Errors in step 2

Hey there!

I have started this project, and I can’t pass over step 2, because I get an error when I try to run npm install.

Later I tried to start a new database with sqlite3, and I couldn’t create it.

Can someone help me?

Thank you.

These are the errors:

[email protected] install C:\Users\molij\Documents\Web Development\X-press-publishing\capstone-project-1-x-press-publishing\node_modules\sqlite3

node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v72-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v72-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI) (falling back to source compile with node-gyp)
gyp ERR! find Python
gyp gypERR! find Python Python is not set from command line or npm configuration
gyp ERR!ERR! find Python
find Pythongyp Python is not set from environment variable PYTHON
gyp ERR!ERR! find Pythonfind Python Python is not set from command line or npm configuration
checking if “python” can be used

and then it continues…

jmoli98
I had the same problem. Here’s what didn’t work… trying to load python and then gyp using help from sources like https://hisk.io/how-to-fix-node-js-gyp-err-cant-find-python-executable-python-on-windows/

What did work… converting my OneDrive synced documents into locally held documents. I suspect you may have the same/similar issue? I save my Codecademy and vs code files on Onedrive. I’d defaulted them to stay in the cloud until needed. But when running an integrated terminal in vscode the system searched my local files only. Hence, after going to the main Onedrive root directory in file explorer in windows 10 and right-clicking and selecting “Always keep on this device” my files loaded locally and only hold a backup in the OneDrive cloud.

Note this fix did lead me to another error you may or may not also experience. ‘MODULE_NOT_FOUND’ with an error message something like "Error: Cannot find module ‘C:/Users\YourName\Your_Project_file’ which is due to running the wrong file, missing dependency, or attempting to run a nonexistent file. Here is the fix I found to this portion of my problem https://www.devdungeon.com/content/how-solve-error-cannot-find-module-js-nodejs
Let me know if this helped you too.

1 Like

Here are some direction provided by NODE


this specifically addresses the Python leading to gyp issues you mention.

notice in the pic above in the first line of code the ERR! find Python. Then in the subsequent lines (around lines 3-4) "gyp ERR! find Python For more information consult the documentation at:


mentioned in my prior post.
Then finally the documentation leads us to:

Where we are instructed on loading the latest version of Python depending on our system.
Im a windows 10 on 64bit user. So I followed those instructions and simply searched for Python 3.8 at the Microsoft store. In fact you can navigate on your computer to where you imported the “skeleton files” and see the .DS_Store file has no software on your PC reading it.
image
You can right click there and select “Open With”



remember to return to

and complete the instructions for either option 1 or 2.

I followed option 1

Option 1

Install all the required tools and configurations using Microsoft’s windows-build-tools using npm install --global windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

WORKAROUND SOLUTION
take the package.json, package-lock.json, and node_Moduels folder with all contents from the Codecademy solutions and replace them with your files. This will not provide you with any solutions to the work it will simply provide you with the appropriate files and dependencies to get the program to run. The fact of the matter is the error corrections are not in the scope of this exercise or the scope of this course. So cut and paste those solution files and folders necessary to run Node.

1 Like

The dependencies of the package.json file from the solution folder seem to be the same as the dependencies of package.json file from the original folder. What should I do in this instance since copying over the solution’s package.json file won’t change anything?

Also I couldn’t find the node modules or package-lock.json files in the solutions folder after typing npm install in the terminal.

Right now I’m trying to install the most up to date version of each dependency needed to run this project properly but keep running into errors.

Overall, I’m disappointed in this project and fear that I may run into similar issues with the rest of the backend projects for this course (this complaint is not directed at you peacefulrick but at Codecademy).

Codecademy should just remove package.json from the project and provide a list of packages to npm install manually. I suggest renaming package.json to get it out of the way while still being able to reference it (e.g., mv package.json package.orig.json); then manually install (npm install --save or npm install --save-dev, as appropriate) each package from the dependencies and devDependencies sections of the original pacakges.json file. This worked for me.

1 Like