Skip to Content
0 likes
Fix pip Installing Into the Wrong Python Environment Level: Intermediate

Reproduce an interpreter mismatch, compare executable, pip and module paths, then verify the repair from the Python environment that runs the application.

0 likes
Test a Python Wheel Outside the Source Repository Level: Advanced

Catch a missing package resource by inspecting a wheel and testing its import, version, data file and console command in a clean environment.

0 likes
Fixing ModuleNotFoundError in Python, One Cause at a Time Level: Intermediate

ModuleNotFoundError has a handful of causes: the wrong Python, an inactive virtual environment, the wrong folder, or a file that shadows a module. Check them in order instead of reinstalling.

0 likes
Python if __name__ == "__main__": What It Does and When You Need It Level: Intermediate

Importing a file runs it. if __name__ == "__main__" keeps a file's script part from running when another file imports it. Use it with a main() function, and know the cases where you don't need it.

0 likes
Python Is Not Recognized? Fixing PATH on Windows, Mac and Linux Level: Beginner

Python is probably installed. Your terminal just can't find it. Check the three possible causes in order, fix the right one on Windows, Mac or Linux, and confirm which Python you're really running.

0 likes
pip freeze vs Writing requirements.txt by Hand: Which One to Use Level: Intermediate

pip freeze gives exact versions but hides what you chose. A hand-written file shows what you chose but isn't exact. For anything you deploy, keep both: one file for intent, one frozen for exact versions.

0 likes
Fix "Cannot use import statement outside a module" Level: Intermediate

The file was loaded as a classic script or CommonJS, where import isn't allowed. The fix in the browser is type="module". In Node it's "type": "module" or .mjs, and recent npm init writes "type": "commonjs" for you.

0 likes
Install Node.js and Check It Actually Works Level: Intermediate

Install the LTS version of Node.js, check the installer's signature, and prove it works in a new terminal with node -v, npm -v and one real install. Plus the fixes for "not recognized" and the wrong version showing.

0 likes
npm install vs npm ci: Same Install on Every Machine Level: Intermediate

Use npm ci to install exactly what the lock file says and npm install to change it. What each command does, when to use which, and how to fix "npm ci can only install packages when your package.json and package-lock.json are in sync".

0 likes
Build and Publish a Small npm Package Level: Advanced

Set up name, version, exports and files in package.json, check exactly what ships with npm pack --dry-run, then publish with npm publish. Mistakes in a published version can't be undone.

0 likes
Find Which TypeScript Compiler Your Project Runs Level: Beginner

Trace a compiler version mismatch, confirm the resolved package path, and make a project-local check catch a deliberate type error.

0 likes
Export Types From a Module Without Runtime Code Level: Intermediate

Compare import type, the inline type keyword and a plain import, and see which ones leave code in the compiled file. After this, a types-only import cannot load a module with side effects.