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

Cannot find module '../index' #51

Closed
AugustDG opened this issue Jan 26, 2021 · 1 comment
Closed

Cannot find module '../index' #51

AugustDG opened this issue Jan 26, 2021 · 1 comment

Comments

@AugustDG
Copy link
Contributor

Hey!

I was trying out this plugin, but couldn't use it as this error always came up:

Error: Cannot find module '../index'
Require stack:
- C:\Users\augus\AppData\Roaming\npm\node_modules\css-shortener\bin\cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Users\augus\AppData\Roaming\npm\node_modules\css-shortener\bin\cli.js:3:22)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\augus\\AppData\\Roaming\\npm\\node_modules\\css-shortener\\bin\\cli.js'
  ]
}

When I went to check the file, it indeed was requiring an '../index', but I couldn't find it either...

const CssShortener = require('../index');
const fs = require('fs');
@AugustDG
Copy link
Contributor Author

AugustDG commented Jan 26, 2021

Just replaced '../index' with 'css-shortener' and it works!

Will create a pull request with the fix!

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

1 participant