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

Fresh install errors - possibly due to [email protected] #958

Closed
StarfallProjects opened this issue Feb 22, 2020 · 11 comments
Closed

Fresh install errors - possibly due to [email protected] #958

StarfallProjects opened this issue Feb 22, 2020 · 11 comments
Labels
bug: environment Had a problem with a third party tool

Comments

@StarfallProjects
Copy link

Describe the bug
Trying to do a fresh local install of 11ty for a new project, getting errors on install. Installation does not complete (11ty doesn't end up listed in the package.json, and doesn't run)

To Reproduce

  1. Run npm install --save-dev @11ty/eleventy
  2. See it throw an error:
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn =
npm ERR! file =
npm ERR! path =
npm ERR! errno ENOENT
npm ERR! [email protected] postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! spawn = ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  1. Try to run with npx @11ty/eleventy (just in case it's an ignorable error)
  2. See it throw another error:
internal/modules/cjs/loader.js:796
    throw err;
    ^

Error: Cannot find module 'C:\Users\debor\Desktop\Code\habermas-terminology\node_modules\@11ty\eleventy\cmd.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
    at Function.Module._load (internal/modules/cjs/loader.js:686:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Environment:

  • Windows 10, PowerShell
  • latest on npm (as of 22nd Feb 2020)

Other
Note that the installation also warns that [email protected] is no longer maintained and should be upgraded to 3.x

@zachleat
Copy link
Member

What’s your node --version?

@StarfallProjects
Copy link
Author

12.15.0

@StarfallProjects
Copy link
Author

StarfallProjects commented Feb 24, 2020

I upgraded to 12.16.1 (the current LTS: https://nodejs.org/en/) and still get the same error.

@DirtyF
Copy link
Contributor

DirtyF commented Feb 24, 2020

Not reproduced on latest macOS with current LTS node:

volta install @11ty/eleventy@latest
success: installed @11ty/[email protected] with executables: eleventy

@StarfallProjects
Copy link
Author

Still having the errors today, so went and tried on Ubuntu via WSL. Node 12.6.1, latest 11ty, and it installed and ran, albeit with quite a few warnings. No errors though.

It looks like somehow Windows/Node on Windows is being more sensitive about the outdated corejs?

@StarfallProjects
Copy link
Author

Tried it on Windows with Git Bash today (in case it was Powershell being a pain) and still had the errors.

@pdehaan
Copy link
Contributor

pdehaan commented Mar 6, 2020

I wonder if this is related to zloirock/core-js#582

@StarfallProjects
Copy link
Author

StarfallProjects commented Mar 6, 2020

@pdehaan that looks like a Powershell issue? Would it explain seeing it in git bash as well?

And I have had successful 11ty installs in the past couple of months,

Edit to add: had time to investigate more today. Went and checked in case I had set my npm script-shell to be Powershell, and:

C:\Users\debor\Desktop> npm config get script-shell
=                                                                         

Not terribly informative, but decided to try unsetting it.
Got:

PS C:\Users\debor\Desktop> npm config get script-shell                                                                  null

And voila - 11ty installed again (various warnings, no errors)

So yup, looks like it was something to do with that issue you linked, thank you!

@zachleat zachleat added bug: dependency A problem in one of Eleventy’s dependencies and removed needs-triage labels Mar 9, 2020
@zachleat
Copy link
Member

zachleat commented Mar 9, 2020

@StarfallProjects okay to close as issue in dependency?

@StarfallProjects
Copy link
Author

@zachleat yes - thanks for the community help on this! I guess I am once again the PowerShell-shaped canary in the coalmine 🤦‍♀

@zachleat zachleat added bug: environment Had a problem with a third party tool and removed bug: dependency A problem in one of Eleventy’s dependencies labels Mar 20, 2020
@zachleat
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: environment Had a problem with a third party tool
Projects
None yet
Development

No branches or pull requests

4 participants