Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to locally run a newly created repo #210

Open
opheliagame opened this issue Oct 13, 2023 · 2 comments
Open

unable to locally run a newly created repo #210

opheliagame opened this issue Oct 13, 2023 · 2 comments

Comments

@opheliagame
Copy link

When trying to run a completely new project locally I am getting the following error

Sass is watching for changes. Press Ctrl-C to stop.

[11ty] Eleventy CLI Fatal Error: (more in DEBUG output)
[11ty] 1. Error in your Eleventy config file '.eleventy.js'. (via EleventyConfigError)
[11ty] 2. Something went wrong installing the "sharp" module
[11ty]
[11ty] The specified procedure could not be found.
[11ty] \\?\C:\Users\Anushuka\Documents\GitHub\new-notes\node_modules\@11ty\eleventy-img\node_modules\sharp\build\Release\sharp-win32-x64.node
[11ty]
[11ty] Possible solutions:
[11ty] - Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
[11ty] - Install for the current win32-x64 runtime: "npm install --platform=win32 --arch=x64 sharp" 
[11ty] - Consult the installation documentation: https://sharp.pixelplumbing.com/install
[11ty] - Ensure the version of sharp aligns with the sharp package: "npm ls sharp" (via Error)      
[11ty]
[11ty] Original error stack trace: Error:
[11ty] Something went wrong installing the "sharp" module
[11ty]
[11ty] The specified procedure could not be found.
[11ty] \\?\C:\Users\Anushuka\Documents\GitHub\new-notes\node_modules\@11ty\eleventy-img\node_modules\sharp\build\Release\sharp-win32-x64.node
[11ty]
[11ty] Possible solutions:
[11ty] - Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
[11ty] - Install for the current win32-x64 runtime: "npm install --platform=win32 --arch=x64 sharp" 
[11ty] - Consult the installation documentation: https://sharp.pixelplumbing.com/install
[11ty] - Ensure the version of sharp aligns with the sharp package: "npm ls sharp"
[11ty]     at Object.<anonymous> (C:\Users\Anushuka\Documents\GitHub\new-notes\node_modules\@11ty\eleventy-img\node_modules\sharp\lib\sharp.js:37:9)
[11ty]     at Module._compile (node:internal/modules/cjs/loader:1105:14)
[11ty]     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
[11ty]     at Module.load (node:internal/modules/cjs/loader:981:32)
[11ty]     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
[11ty]     at Module.require (node:internal/modules/cjs/loader:1005:19)
[11ty]     at require (node:internal/modules/cjs/helpers:102:18)
[11ty]     at Object.<anonymous> (C:\Users\Anushuka\Documents\GitHub\new-notes\node_modules\@11ty\eleventy-img\node_modules\sharp\lib\constructor.js:11:1)
[11ty]     at Module._compile (node:internal/modules/cjs/loader:1105:14)
[11ty]     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
ERROR: "watch:eleventy" exited with 1.
@opheliagame
Copy link
Author

I think I found the reason.

Ensure the version of sharp aligns with the eleventy-plugin-gen-favicons package: "npm ls sharp"
When checking version of sharp using this, the output is

├─┬ @11ty/eleventy-img@3.1.0
│ └── sharp@0.32.6 deduped
├─┬ eleventy-plugin-gen-favicons@1.1.2
│ └── sharp@0.31.3
└── sharp@0.32.6

I removed the favicon plugin from .eleventy.js file and the project started running.
@oleeskild
Is this issue not happening on your end?

@dayne
Copy link

dayne commented Oct 21, 2023

I can't help with the issue here but as I look at the error and I see windows file paths and installations of npm stuff with .exe files it just causes me to cringe a bit because that is such a different build environment for both access to the filesystem but also tool/shell environment than is being used for the official build (vercel/other) your site goes through.

I personally suggest that you consider setting up Windows Subsystem for Linux (WSL) on your windows machine if that is possible and setting up a deployment environment in there. That will better match the real deployment environment (vercel / github). That effectively spins up a well integrated Linux virtual machine that better mirrors GitHub Actions / Vercel / any real cloud deployment/build environment.

Hope you get/got past this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants