Comments (12)
Did the linked PR actually fix this issue?
I also had this problem yesterday and updated to 0.8.2 today, but im still getting the same error when trying to import @discordjs/builders.
Already reset my modules folder to make sure its using ow 0.27.0 and builder 0.8.2
Someone in the linked ow issue (sindresorhus/ow#215) also said they have this problem with 0.27.0
I also tried creating a completely new Node project and installed only [email protected] and tried to run a mjs file only containing:
import ow from 'ow';
ow.string.minLength(1);
Still resulted in TypeError: Cannot read properties of undefined (reading 'minLength')
from builders.
If this helps at all, even after having 'ow' downgraded to
^0.27.0
, the error still occurs for me but only when importing it using ES6.import { SlashCommandBuilder } from '@discordjs/builders'When using 'require', the error doesn't appear.
const { SlashCommandBuilder } = require('@discordjs/builders')
There is no require
in ESM. Anyway there are PRs #56 and #58 and whichever will end up being merged will mean ow
is gone and this problem is resolved.
from builders.
Temporary solution:
- Type
npm shrinkwrap
. This deletes your package-lock.json and creates an npm-shrinkwrap.json - Inside the npm-shrinkwrap.json, search for
node_modules/@discordjs/builders
- Under
dependencies
ofnode_modules/@discordjs/builders
, change the version of ow to^0.27.0
- Delete your node_modules and type
npm install
from builders.
Why was this issue closed when the issue itself hasn't been resolved?
The author of the first PR attempting to fix this issue (#55) used a closing keyword which is triggered on merge into the main branch.
from builders.
#58 Fixed the bug for me! Now the discordjs package needs to be updated to use 0.9.0 instead of 0.8.2!
from builders.
Or temporary solution for yarn users add to your package.json
"resolutions": {
"ow": "0.27.0"
}
from builders.
no it didn't, but it took some time for a real fix @Gamer025 sorry about that
from builders.
Is there any solution for this at the moment? I'm getting the same error on a fresh build with @discord/[email protected]
and [email protected]
.
Got plenty of other bits to be working on in the meantime if the fix for this is still a way off 🙂
from builders.
there is a pr to fix this linked above, in the meantime you can force install an older builders version with npm i @discordjs/[email protected]
from builders.
Why was this issue closed when the issue itself hasn't been resolved?
I was about to create a new issue for it before I looked at pull requests where #56 linked here.
from builders.
Ah that makes sense, thanks for reopening it.
from builders.
If this helps at all, even after having 'ow' downgraded to ^0.27.0
, the error still occurs for me but only when importing it using ES6.
import { SlashCommandBuilder } from '@discordjs/builders'
When using 'require', the error doesn't appear.
const { SlashCommandBuilder } = require('@discordjs/builders')
from builders.
Related Issues (20)
- Builder for listing items in a list (for `and` and `or`) HOT 1
- Interface for SlashCommandBuilder#toJSON() HOT 25
- TypeError: Cannot read property 'createMessageComponentCollector' of undefined HOT 1
- Builders for User and Message commands HOT 1
- New methods addSubcommands and addSubcommandGroups
- ApplicationCommand builder HOT 1
- Add Builder#toData
- Ability to add command handler functions HOT 3
- Channel types for channel option HOT 2
- Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/interactions/slashCommands/mixins/CommandOptionWithChoices' is not defined by "exports" in C:\Users\NORI\Documents\D iscord\bots\boilerplate\node_modules\@discordjs\builders\package.json HOT 2
- Add autocomplete to options HOT 2
- Context Menus HOT 3
- Replace Babel with SWC HOT 1
- Types: embed.setColor() not showing ColorResolvable or number[] HOT 1
- Validation errors reported by zod are not useful HOT 10
- (types): ApplicationCommandNumberOptionBase is not extending base properly HOT 7
- Broken link in documentation HOT 2
- Validation errors HOT 3
- Wrong sub/commands types HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from builders.