ttps://nextjs.org/docs/messages/module-not-found PS…
- User
ttps://nextjs.org/docs/messages/module-not-found
PS C:\Users\israe\Documents\GitHub\webapp\apps\web> ^C PS C:\Users\israe\Documents\GitHub\webapp\apps\web> PS C:\Users\israe\Documents\GitHub\webapp\apps\web> pnpm add @googlemaps/google-maps-services-js ERR_PNPM_UNEXPECTED_STORE Unexpected store location
The dependencies at "C:\Users\israe\Documents\GitHub\webapp\apps\web\node_modules" are currently linked from the store at "C:\Users\israe\AppData\Roaming\npm\store\v3".
pnpm now wants to use the store at "C:\Users\israe\AppData\Roaming\pnpm\store\v3" to link dependencies.
If you want to use the new store location, reinstall your dependencies with "pnpm install".
You may change the global store location by running "pnpm config set store-dir --global". (This error may happen if the node_modules was installed with a different major version of pnpm) PS C:\Users\israe\Documents\GitHub\webapp\apps\web>
- Assistant
The error message you're encountering indicates an issue with the PNPM store location. This is usually due to discrepancies in versions or configurations of PNPM used in your environment. Here's how you can resolve this issue:
Steps to Resolve:
-
Reinstall Dependencies: You can try reinstalling your project dependencies. This will use the current PNPM store location and resolve any existing discrepancies.
pnpm install -
Set a Consistent Store Location: If you want to set a specific global store location for PNPM that remains consistent across your projects, use the following command:
pnpm config set store-dir <desired-directory> --globalReplace
<desired-directory>with the path to the directory you want to use as the PNPM store. -
Clear Existing Node Modules and Reinstall: If simply running
pnpm installdoesn't solve the problem, you may need to manually clear thenode_modulesdirectory and reinstall:rm -rf node_modules pnpm install -
Update PNPM: Ensure that you are using the latest version of PNPM. Update to the latest version if necessary:
npm install -g pnpm -
Check for Version Conflicts: If you have multiple projects using PNPM, ensure they are all on the same major version to avoid any incompatibilities. You can check your current version with:
pnpm -v
These steps should help resolve the
ERR_PNPM_UNEXPECTED_STOREerror you're encountering. Try following them, and you should be able to add the@googlemaps/google-maps-services-jspackage without further issues. -
- User
israe@DESKTOP-1KQFLP1 MINGW64 ~/Documents/GitHub/webapp (main) $ cd /Documents/GitHub/webapp/apps\web bash: cd: /Documents/GitHub/webapp/appsweb: No such file or directory
israe@DESKTOP-1KQFLP1 MINGW64 ~/Documents/GitHub/webapp (main) $
- Assistant
It looks like you're trying to navigate to the
webdirectory withinapps, but the slash direction in your command is incorrect for the path you seem to be aiming for. Since you are using Git Bash on Windows, make sure to either:- Use forward slashes (
/) consistently, even in Windows paths, since you're in a Unix-like environment (Git Bash). - Escape the backslash (
\) properly if you intend to use it, or switch to using forward slashes.
Here's the correct command using forward slashes:
cd /Documents/GitHub/webapp/apps/webEnsure that the directory actually exists and that spelling/capitalization for the directories in the path matches exactly what's on your file system. In case the path doesn't work, double-check with a graphical file explorer or the terminal using:
ls /Documents/GitHub/webapp/appsThis will help confirm the directory structure and find any discrepancies. If you encounter an issue, make sure you're using the correct path that reflects the exact structure on your system.
- Use forward slashes (