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 'babel-core' #11

Open
devxbasit opened this issue Jul 18, 2020 · 3 comments
Open

Cannot find module 'babel-core' #11

devxbasit opened this issue Jul 18, 2020 · 3 comments

Comments

@devxbasit
Copy link

Hi Jaceck, I'm getting error because of this ["styled-icons/fa-solid/ChevronLeft" :refer [ChevronLeft]] can you provide a fix

[:app] Compiling ...
internal/modules/cjs/loader.js:969
throw err;
^

Error: Cannot find module 'babel-core'
Require stack:

  • /home/mustafa-basit/Documents/Git@MustafaBasit/Clojurescript/cheffy/.shadow-cljs/babel-worker/babel-worker.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at /home/mustafa-basit/Documents/Git@MustafaBasit/Clojurescript/cheffy/.shadow-cljs/babel-worker/babel-worker.js:398:229
    at Object. (/home/mustafa-basit/Documents/Git@MustafaBasit/Clojurescript/cheffy/.shadow-cljs/babel-worker/babel-worker.js:403:3)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/mustafa-basit/Documents/Git@MustafaBasit/Clojurescript/cheffy/.shadow-cljs/babel-worker/babel-worker.js'
    ]
    }
    [2020-07-18 21:40:55.527 - WARNING] :shadow.build.babel/babel-transform-ex - {:code "var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n};\nimport * as React from 'react';\nimport styled from 'styled-components';\nvar StyledIcon = React.forwardRef(function (props, ref) {\n var title = props.title, size = props.size, svgProps = __rest(props, ["title", "size"]);\n var iconProps = {\n viewBox: '0 0 320 512',\n height: props.height !== undefined ? props.height : props.size,\n width: props.width !== undefined ? props.width : props.size,\n // @ts-ignore - aria is not always defined on SVG in React TypeScript types\n 'aria-hidden': props.title == null ? 'true' : undefined,\n focusable: 'false',\n role: props.title != null ? 'img' : undefined,\n "fill": "currentColor",\n };\n return (React.createElement("svg", __assign({}, iconProps, svgProps, { ref: ref }),\n props.title && React.createElement("title", { key: "ChevronLeft-title" }, props.title),\n React.createElement("path", { fill: "currentColor", d: "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z", key: "k0" })));\n});\nexport var ChevronLeft = styled(StyledIcon)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n vertical-align: -.125em;\n overflow: hidden;\n"], ["\n display: inline-block;\n vertical-align: -.125em;\n overflow: hidden;\n"])));\nChevronLeft.displayName = 'ChevronLeft';\nexport var ChevronLeftDimensions = { height: undefined, width: undefined };\nvar templateObject_1;\n", :resource-name "node_modules/styled-icons/fa-solid/ChevronLeft.js", :shadow.build.babel/reply-to #object[clojure.core.async.impl.channels.ManyToManyChannel 0x52039945 "clojure.core.async.impl.channels.ManyToManyChannel@52039945"]}
    RuntimeException EOF while reading
    clojure.lang.Util.runtimeException (Util.java:221)
    clojure.lang.LispReader.read (LispReader.java:258)
    clojure.lang.LispReader.read (LispReader.java:206)
    clojure.lang.LispReader.read (LispReader.java:200)
    clojure.core/read (core.clj:3758)
    clojure.core/read (core.clj:3733)
    clojure.core/read (core.clj:3733)
    clojure.core/read (core.clj:3733)
    shadow.build.babel/babel-transform! (babel.clj:130)
    shadow.build.babel/babel-transform! (babel.clj:116)
    shadow.build.babel/babel-loop (babel.clj:149)
    shadow.build.babel/babel-loop (babel.clj:146)
    [:app] Build failure:
    babel failed?
    {:resource-name "node_modules/styled-icons/fa-solid/ChevronLeft.js"}

    ExceptionInfo: babel failed?
    clojure.core/ex-info (core.clj:4739)
    clojure.core/ex-info (core.clj:4739)
    shadow.build.babel/convert-source/fn--11164 (babel.clj:186)
    shadow.build.babel/convert-source (babel.clj:179)
    shadow.build.babel/convert-source (babel.clj:175)
    shadow.build.resolve/fn--11233/fn--11239 (resolve.clj:237)
    shadow.build.data/get-source-code (data.clj:302)
    shadow.build.data/get-source-code (data.clj:289)
    shadow.build.closure/convert-sources-simple*/iter--10988--10992/fn--10993/fn--10994 (closure.clj:1633)
    shadow.build.closure/convert-sources-simple*/iter--10988--10992/fn--10993 (closure.clj:1632)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.RT.seq (RT.java:528)
    clojure.core/seq--5124 (core.clj:137)
    clojure.core.protocols/seq-reduce (protocols.clj:24)
    clojure.core.protocols/fn--7835 (protocols.clj:75)
    clojure.core.protocols/fn--7835 (protocols.clj:75)
    clojure.core.protocols/fn--7781/G--7776--7794 (protocols.clj:13)
    clojure.core/reduce (core.clj:6748)
    clojure.core/into (core.clj:6815)
    clojure.core/into (core.clj:6807)
    shadow.build.closure/convert-sources-simple* (closure.clj:1641)
    shadow.build.closure/convert-sources-simple* (closure.clj:1628)
    shadow.build.closure/convert-sources-simple (closure.clj:1880)
    shadow.build.closure/convert-sources-simple (closure.clj:1832)
    shadow.build.compiler/maybe-closure-convert (compiler.clj:989)
    shadow.build.compiler/maybe-closure-convert (compiler.clj:982)
    shadow.build.compiler/compile-all (compiler.clj:1158)
    shadow.build.compiler/compile-all (compiler.clj:1045)
    shadow.build.api/compile-sources (api.clj:242)
    shadow.build.api/compile-sources (api.clj:234)
    shadow.build/compile (build.clj:368)
    shadow.build/compile (build.clj:359)
    shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:251)
    shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:237)
    shadow.cljs.devtools.server.worker.impl/do-resource-update (impl.clj:830)
    shadow.cljs.devtools.server.worker.impl/do-resource-update (impl.clj:793)
    shadow.cljs.devtools.server.util/server-thread/fn--13556/fn--13557/fn--13565 (util.clj:292)
    shadow.cljs.devtools.server.util/server-thread/fn--13556/fn--13557 (util.clj:291)
    shadow.cljs.devtools.server.util/server-thread/fn--13556 (util.clj:264)
    java.lang.Thread.run (Thread.java:834)
@jacekschae
Copy link
Owner

Hi there,

When you navigate to your node_modules/styled-icons/fa-solid do you find the ChevronLeft.js?

@devxbasit
Copy link
Author

devxbasit commented Jul 20, 2020

yes, its there ChevronLeft.js

Also these as well ChevronLeft.cjs.js ChevronLeft.d.ts

@jacekschae
Copy link
Owner

That is a good first step. I believe your version of the package change?

Can you try to see what is the documentation saying about export? You can look up how would that work with shadow-cljs here: https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages

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