Coder Social home page Coder Social logo

Comments (6)

davej avatar davej commented on September 26, 2024

Getting a similar error on 0.4.3 when trying to use XO:

Error: Cannot read config package: eslint-config-xo
Error: Cannot find module 'eslint-config-xo'
Referenced from:
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at loadPackage (/Users/dave/github/john/node_modules/a2279c91150e20db04ce0a710023d15e6d9616a7/lib/config/config-file.js:168:16)
    at loadConfigFile (/Users/dave/github/john/node_modules/a2279c91150e20db04ce0a710023d15e6d9616a7/lib/config/config-file.js:212:18)
    at load (/Users/dave/github/john/node_modules/a2279c91150e20db04ce0a710023d15e6d9616a7/lib/config/config-file.js:385:18)
    at /Users/dave/github/john/node_modules/a2279c91150e20db04ce0a710023d15e6d9616a7/lib/config/config-file.js:326:36
    at Array.reduceRight (native)
    at Object.applyExtends (/Users/dave/github/john/node_modules/a2279c91150e20db04ce0a710023d15e6d9616a7/lib/config/config-file.js:309:28)

from ied.

sterpe avatar sterpe commented on September 26, 2024

I am also having this problem with standard.

from ied.

sterpe avatar sterpe commented on September 26, 2024

@alexanderGugel I think this may be a limitation of ied in it's implementation. eslint provides an api to load plugins on demand via require after the module is cached. require resolves eslint itself to the actual module fs path after resolving the symlinks per node docs:

Since Node.js looks up the realpath of any modules it loads (that is, resolves symlinks), and then looks for their dependencies in the node_modules folders as described

With ied that eslint module ends up at node_modules/xyz123 instead of the symlink virtual path of node_modules/standard/node_modules/eslint therefor it can't see the other symlinks in node_modules/standard/node_modules/ such as the one to eslint-plugins-standard.

from ied.

sterpe avatar sterpe commented on September 26, 2024

This is pretty common -- runtime requires. I'm not sure how ied can address this at the current time short of hacking on require itself?

from ied.

bgaillard avatar bgaillard commented on September 26, 2024

Hi, we also encounter the problem with Grunt.

PS C:\workspace\vgm-php-services> ied install
PS C:\workspace\vgm-php-services> grunt test
module.js:341
    throw err;
    ^

Error: Cannot find module 'coffee-script'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (C:\workspace\vgm-php-services\node_modules\81abf7ad6694e9a30982f78a7b69236d5bb4df4f\lib\grunt.js:16:1)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)

As a workaround I tried to add the dependencies ied cannot find as additional dependencies in my package.json file (the list is long in my case...).

...
"coffee-script": "~1.10",
    "grunt-legacy-util": "~1.0",
    "getobject": "~0.1",
    "hooker": "~0.2",
    "async": "~1.5",
    "lodash": "~4.12",
    "which": "~1.2",
    "isexe" : "~1.1",
    "is-absolute" : "~0.2",
    "is-relative" : "~0.2",
    "is-unc-path" : "~0.1",
    "unc-path-regex" : "~0.1",
    "is-windows" : "~0.1",
    "exit" : "~0.1",
    "underscore.string" : "~3.3",
    "util-deprecate" : "~1.0",
    "sprintf-js" : "~1.0",
    "grunt-legacy-log" : "~1.0",
    "colors" : "~1.1",
    "grunt-legacy-log-utils" : "~0.1",
    "dateformat" : "~1.0",
    "eventemitter2" : "~1.0",
    "glob" : "~7.0",
    "minimatch" : "~3.0",
    "brace-expansion" : "~1.1",
    "concat-map" : "~0.0",
    "balanced-match" : "~0.4",
    "inherits" : "~2.0",
    "path-is-absolute" : "~1.0",
    "inflight" : "~1.0",
    "wrappy" : "~1.0",
    "once" : "~1.3",
    "findup-sync" : "~0.4",
    "is-glob" : "~2.0",
    "is-extglob" : "~1.0",
    "resolve-dir" : "~0.1",
    "expand-tilde" : "~1.2",
    "os-homedir" : "~1.0",
    "global-modules" : "~0.2",
    "global-prefix" : "~0.1",
    "micromatch" : "~2.3",
    "filename-regex" : "~2.0",
    "arr-diff" : "~3.0",
    "arr-flatten" : "~1.0",
    "array-unique" : "~0.2",
    "braces" : "~1.8",
    "expand-range" : "~1.8",
    "fill-range" : "~2.2",
    "isobject" : "~2.1",
    "isarray" : "~1.0",
    "is-number" : "~2.1",
    "kind-of" : "~3.0",
    "is-buffer" : "~1.1",
    "randomatic" : "~1.1",
    "repeat-string" : "~1.5",
    "repeat-element" : "~1.1",
    "preserve" : "~0.2",
    "expand-brackets" : "~0.1",
    "is-posix-bracket" : "~0.1",
    "extglob" : "~0.3",
    "normalize-path" : "~2.0",
    "object.omit" : "~2.0",
    "is-extendable" : "~0.1",
    "for-own" : "~0.1",
    "for-in" : "~0.1",
    "parse-glob" : "~3.0",
    "glob-base" : "~0.3",
    "glob-parent" : "~2.0",
    "is-dotfile" : "~1.0",
    "regex-cache" : "~0.4",
    "is-primitive" : "~2.0",
    "is-equal-shallow" : "~0.1",
    "js-yaml" : "~3.0"

But I'm now having an other error.

PS C:\workspace\vgm-php-services> grunt test
C:\workspace\vgm-php-services\node_modules\e0b3565c8332d3cb9f511f3f2f510640a8dd5bba\lib\js-yaml\type\js\function.js:17
  if (window) { esprima = window.esprima; }
      ^

ReferenceError: window is not defined
  at Object.<anonymous> (C:\workspace\vgm-php-services\node_modules\e0b3565c8332d3cb9f511f3f2f510640a8dd5bba\lib\js-yaml\type\js\function.js:17:7)
  at Module._compile (module.js:413:34)
  at Object.Module._extensions..js (module.js:422:10)
  at Module.load (module.js:357:32)
  at Function.Module._load (module.js:314:12)
  at Module.require (module.js:367:17)
  at require (internal/module.js:16:19)
  at Object.<anonymous> (C:\workspace\vgm-php-services\node_modules\e0b3565c8332d3cb9f511f3f2f510640a8dd5bba\lib\js-yaml\schema\default_full.js:23:5)
  at Module._compile (module.js:413:34)
  at Object.Module._extensions..js (module.js:422:10)
  at Module.load (module.js:357:32)
  at Function.Module._load (module.js:314:12)
  at Module.require (module.js:367:17)
  at require (internal/module.js:16:19)
  at Object.<anonymous> (C:\workspace\vgm-php-services\node_modules\e0b3565c8332d3cb9f511f3f2f510640a8dd5bba\lib\js-yaml\loader.js:8:27)
  at Module._compile (module.js:413:34)
  at Object.Module._extensions..js (module.js:422:10)
  at Module.load (module.js:357:32)
  at Function.Module._load (module.js:314:12)
  at Module.require (module.js:367:17)
  at require (internal/module.js:16:19)
  at Object.<anonymous> (C:\workspace\vgm-php-services\node_modules\e0b3565c8332d3cb9f511f3f2f510640a8dd5bba\lib\js-yaml.js:4:14)
  at Module._compile (module.js:413:34)
  at Object.Module._extensions..js (module.js:422:10)
  at Module.load (module.js:357:32)
  at Function.Module._load (module.js:314:12)
  at Module.require (module.js:367:17)
  at require (internal/module.js:16:19)
  at Object.<anonymous> (C:\workspace\vgm-php-services\node_modules\e0b3565c8332d3cb9f511f3f2f510640a8dd5bba\index.js:6:12)
  at Module._compile (module.js:413:34)
  at Object.Module._extensions..js (module.js:422:10)
  at Module.load (module.js:357:32)
  at Function.Module._load (module.js:314:12)
  at Module.require (module.js:367:17)
  at require (internal/module.js:16:19)
  at Object.<anonymous> (C:\workspace\vgm-php-services\node_modules\81abf7ad6694e9a30982f78a7b69236d5bb4df4f\lib\grunt\file.js:25:12)
  at Module._compile (module.js:413:34)
  at Object.Module._extensions..js (module.js:422:10)
  at Module.load (module.js:357:32)
  at Function.Module._load (module.js:314:12)
  at Module.require (module.js:367:17)
  at require (internal/module.js:16:19)
  at gRequire (C:\workspace\vgm-php-services\node_modules\81abf7ad6694e9a30982f78a7b69236d5bb4df4f\lib\grunt.js:23:24)
  at Object.<anonymous> (C:\workspace\vgm-php-services\node_modules\81abf7ad6694e9a30982f78a7b69236d5bb4df4f\lib\grunt.js:37:1)
  at Module._compile (module.js:413:34)
  at Object.Module._extensions..js (module.js:422:10)
  at Module.load (module.js:357:32)
  at Function.Module._load (module.js:314:12)
  at Module.require (module.js:367:17)
  at require (internal/module.js:16:19)
  at Object.<anonymous> (C:\Users\bouba\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt:45:1)
  at Module._compile (module.js:413:34)
  at Object.Module._extensions..js (module.js:422:10)
  at Module.load (module.js:357:32)
  at Function.Module._load (module.js:314:12)
  at Function.Module.runMain (module.js:447:10)
  at startup (node.js:139:18)
  at node.js:999:3

So, do you know any workaround to allow us to use {{ied}} with Grunt in our case ?

Thanks

from ied.

kingbuzzman avatar kingbuzzman commented on September 26, 2024

Any current/new workaround? Specifying all the dependencies ied can't find isn't working for gulp.

from ied.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.