johanbrook / eleventy-plugin-typeset

A plugin for the Eleventy static site generator for making your typography nicer.
18 stars 7 forks source link

Error: Cannot find module './typeset' #3

Open francisbarton opened 5 years ago

francisbarton commented 5 years ago

When I run npx @11ty/eleventy it is giving me the error

Error: Cannot find module './typeset'
`Error` was thrown:
    Error: Cannot find module './typeset'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
        at Function.Module._load (internal/modules/cjs/loader.js:507:25)
        at Module.require (internal/modules/cjs/loader.js:637:17)
        at require (internal/modules/cjs/helpers.js:22:18)
        at Object.<anonymous> (C:\Users\Francis\alwaysdata\eleventy\node_modules\eleventy-plugin-typeset\index.js:1:84)
        at Module._compile (internal/modules/cjs/loader.js:689:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
        at Module.load (internal/modules/cjs/loader.js:599:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
        at Function.Module._load (internal/modules/cjs/loader.js:530:3)

I have added the config to my .eleventy.js file. Everything runs ok when I comment out the typeset related bits in that file.

This is what happened when I installed the plugin:

>npm install --save eleventy-plugin-typeset
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ eleventy-plugin-typeset@1.0.0
added 19 packages from 14 contributors and audited 6234 packages in 87.887s
found 3 vulnerabilities (1 low, 2 high)
run `npm audit fix` to fix them, or `npm audit` for details
francisbarton commented 5 years ago

From the package.json, if that helps at all. typeset is in a separate section to other plugins.

"devDependencies": {
    "@11ty/eleventy": "^0.9.0",
    "@11ty/eleventy-plugin-rss": "^1.0.7",
    "@11ty/eleventy-plugin-syntaxhighlight": "^2.0.3",
    "luxon": "^1.18.0",
    "markdown-it": "^8.4.2",
    "markdown-it-anchor": "^5.2.4"
  },
  "dependencies": {
    "eleventy-plugin-typeset": "^1.0.0"
  }
liamfiddler commented 4 years ago

There are two PRs open to fix this (#1 & #2) but they've been open for a while with no action.

In the meantime the easiest solution might be to use my forked repo instead of this one. You can do that by changing this line in package.json from

"eleventy-plugin-typeset": "^1.0.0" to "eleventy-plugin-typeset": "github:liamfiddler/eleventy-plugin-typeset"

and running npm install again.

jacobbf commented 3 years ago

Seeing as this issue remains and prs are still open, maybe we're at the point were we publish a new package? Or see if we can't get @johanbrook to transfer ownership/give some other folks management access?

patrulea commented 3 years ago

Where is @johanbrook?

jacobbf commented 3 years ago

@johanbrook would you mind hopping in here to help us out?

jacobbf commented 2 years ago

Since this has seemingly been abandoned (unless you want to merge that PR @johanbrook) and the various forks (understandably) aren't being updated I've made another fork over here.

I use this in every 11ty project (and I have a lot of 11ty projects) so I'll be keeping it updated. If this lingers for long enough I'll probably throw it up on npm, but in the meantime there's this:

 "eleventy-plugin-typeset": "github:arcades-studio/eleventy-plugin-typeset-again"