Hello! Hope you guys are doing great.
I am trying to add a dependency to this new Discourse based project I am working on Project
I want to use this plugin under the app/assets/javascript/discourse
workspace
I executed: yarn add @warp-drive/ember
inside the mentioned path:
╭─ ~/github_projects/music_maniacs_discourse/app/assets/javascripts/discourse artists_pages ⇡1 *1 ▓▒░···································································░▒▓ ✔ 20.9.0
╰─ yarn add @warp-drive/ember
yarn add v1.22.18
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Lockfile has incorrect entry for "unset-value@^1.0.0". Ignoring it.
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning "workspace-aggregator-a7f879f1-920e-42a7-93a3-56977ca5d267 > discourse-markdown-it@1.0.0" has unmet peer dependency "xss@*".
warning "workspace-aggregator-a7f879f1-920e-42a7-93a3-56977ca5d267 > @discourse/lint-configs@1.3.9" has incorrect peer dependency "ember-template-lint@6.0.0".
warning "workspace-aggregator-a7f879f1-920e-42a7-93a3-56977ca5d267 > @glint/environment-ember-loose@1.4.0" has unmet peer dependency "@glimmer/component@^1.1.2".
warning "workspace-aggregator-a7f879f1-920e-42a7-93a3-56977ca5d267 > discourse > @uppy/aws-s3@3.0.6" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-a7f879f1-920e-42a7-93a3-56977ca5d267 > discourse > @uppy/aws-s3-multipart@3.1.3" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-a7f879f1-920e-42a7-93a3-56977ca5d267 > discourse > @uppy/xhr-upload@3.1.1" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-a7f879f1-920e-42a7-93a3-56977ca5d267 > discourse-plugins > ember-this-fallback@0.4.0" has unmet peer dependency "ember-source@^3.28.11 || ^4.0.0".
warning "workspace-aggregator-a7f879f1-920e-42a7-93a3-56977ca5d267 > admin > ember-source > router_js@8.0.3" has unmet peer dependency "rsvp@^4.8.5".
warning "workspace-aggregator-a7f879f1-920e-42a7-93a3-56977ca5d267 > discourse > @uppy/aws-s3 > @uppy/xhr-upload@3.3.0" has incorrect peer dependency "@uppy/core@^3.2.1".
warning " > @warp-drive/ember@0.0.0-alpha.70" has unmet peer dependency "@ember-data/store@^4.12.7 || > 5.3.3".
warning " > @warp-drive/ember@0.0.0-alpha.70" has unmet peer dependency "@ember-data/request@^4.12.7 || > 5.3.3".
warning " > @warp-drive/ember@0.0.0-alpha.70" has unmet peer dependency "@ember-data/request-utils@^4.12.7 || > 5.3.3".
warning " > @warp-drive/ember@0.0.0-alpha.70" has unmet peer dependency "@warp-drive/core-types@0.0.0-alpha.94".
warning " > @warp-drive/ember@0.0.0-alpha.70" has unmet peer dependency "@ember-data/tracking@^4.12.7 || > 5.3.3".
[5/5] Building fresh packages...
success Saved lockfile.
success Saved 3 new dependencies.
info Direct dependencies
info All dependencies
├─ @warp-drive/build-config@0.0.0-alpha.45
├─ @warp-drive/ember@0.0.0-alpha.70
└─ unset-value@1.0.0
$ ../run-patch-package
patch-package 8.0.0
Applying patches...
No patch files found
Done in 10.70s.
and when entering localhost:4200 after adding the dependency and importing in one of my routes like this:
import { getPromiseState } from '@warp-drive/ember';
i get this error:
# Dang! Looks like a Build Error.
## ../../../../../../../node_modules/@warp-drive/ember/dist/index.js
Module build failed (from ../../../../../../../node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@warp-drive/ember/dist/index.js/index.js: Cannot read properties of undefined (reading 'env')
at get value [as value] (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@embroider/macros/src/babel/evaluate-json.js:139:57)
at get value [as value] (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@embroider/macros/src/babel/evaluate-json.js:139:52)
at macroCondition (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@embroider/macros/src/babel/macro-condition.js:37:41)
at PluginPass.enter (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@embroider/macros/src/babel/macros-babel-plugin.js:56:51)
at newFn (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/visitors.js:172:14)
at NodePath._call (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/path/context.js:49:20)
at NodePath.call (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/path/context.js:39:18)
at NodePath.visit (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/path/context.js:85:31)
at TraversalContext.visitQueue (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:89:16)
at TraversalContext.visitSingle (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:65:19)
at TraversalContext.visit (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:112:19)
at traverseNode (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/path/context.js:91:52)
at TraversalContext.visitQueue (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:89:16)
at TraversalContext.visitMultiple (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:61:17)
at TraversalContext.visit (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:110:19)
at traverseNode (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/path/context.js:91:52)
at TraversalContext.visitQueue (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:89:16)
at TraversalContext.visitSingle (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:65:19)
at TraversalContext.visit (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:112:19)
at traverseNode (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/path/context.js:91:52)
at TraversalContext.visitQueue (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:89:16)
at TraversalContext.visitMultiple (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:61:17)
at TraversalContext.visit (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:110:19)
at traverseNode (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/path/context.js:91:52)
at TraversalContext.visitQueue (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:89:16)
at TraversalContext.visitSingle (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:65:19)
at TraversalContext.visit (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/context.js:112:19)
at traverseNode (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at traverse (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/traverse/lib/index.js:53:34)
at transformFile (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/core/lib/transformation/index.js:82:31)
at transformFile.next (<anonymous>)
at run (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/core/lib/transformation/index.js:24:12)
at run.next (<anonymous>)
at transform (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/@babel/core/lib/transform.js:22:33)
at transform.next (<anonymous>)
at step (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/gensync/index.js:261:32)
at /home/xeitor/github_projects/music_maniacs_discourse/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/home/xeitor/github_projects/music_maniacs_discourse/node_modules/gensync/index.js:223:11)
is there any extra step I am missing for adding new dependencies? thanks in advance