Replies: 1 comment
-
|
Mantine packages cannot be used directly in the browser, they require bundler step to compile. This can be achieved by using Vite. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dependencies check up
What version of @mantine/* packages do you have in package.json?
8.3.5
What package has an issue?
@mantine/core
What framework do you use?
Other, I will specify in the bug description
In which browsers you can reproduce the issue?
None
Describe the bug
I'm trying to use Mantine in combination with Microsoft Power BI Custom visual. Here's my package.json
{
"name": "visual",
"description": "default_template_value",
"repository": {
"type": "default_template_value",
"url": "default_template_value"
},
"license": "MIT",
"scripts": {
"pbiviz": "pbiviz",
"start": "pbiviz start",
"package": "pbiviz package",
"lint": "tslint -c tslint.json -p tsconfig.json"
},
"dependencies": {
"@babel/runtime": "7.6.0",
"@babel/runtime-corejs2": "7.6.0",
"@mantine/charts": "^8.3.5",
"@mantine/core": "^8.3.5",
"@mantine/hooks": "^8.3.5",
"@tabler/icons-react": "^3.35.0",
"@types/d3": "5.7.2",
"@types/react": "^17.0.34",
"@types/react-dom": "^17.0.11",
"core-js": "3.2.1",
"date-fns": "^3.6.0",
"framer-motion": "^11.2.12",
"numeral": "^2.0.6",
"powerbi-client": "^2.23.1",
"powerbi-models": "^1.9.5",
"powerbi-visuals-api": "~5.8.0",
"powerbi-visuals-utils-dataviewutils": "2.2.1",
"powerbi-visuals-utils-formattingutils": "^6.1.2",
"present": "^1.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"process": "^0.11.10",
"ts-loader": "6.1.0",
"tslint": "^5.18.0",
"typescript": "^5.5.2"
}
}
The error I'm receiving is as follows:
ERROR in ./node_modules/@mantine/core/esm/core/utils/get-env/get-env.mjs 3:13-20
Module not found: Error: Can't resolve 'process/browser' in 'C:\Users\raben\Documents\PBI Custom Visuals\Projects\React\mantineVisual\node_modules@mantine\core\esm\core\utils\get-env'
Did you mean 'browser.js'?
BREAKING CHANGE: The request 'process/browser' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
resolve 'process/browser' in 'C:\Users\raben\Documents\PBI Custom Visuals\Projects\React\mantineVisual\node_modules@mantine\core\esm\core\utils\get-env'
Parsed request is a module
using description file: C:\Users\raben\Documents\PBI Custom Visuals\Projects\React\mantineVisual\node_modules@mantine\core\package.json (relative path: ./esm/core/utils/get-env)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
C:\Users\raben\Documents\PBI Custom Visuals\Projects\React\mantineVisual\node_modules@mantine\core\esm\core\utils\get-env\node_modules doesn't exist or is not a directory
C:\Users\raben\Documents\PBI Custom Visuals\Projects\React\mantineVisual\node_modules@mantine\core\esm\core\utils\node_modules doesn't exist or is not a directory
C:\Users\raben\Documents\PBI Custom Visuals\Projects\React\mantineVisual\node_modules@mantine\core\esm\core\node_modules doesn't exist or is not a directory
C:\Users\raben\Documents\PBI Custom Visuals\Projects\React\mantineVisual\node_modules@mantine\core\esm\node_modules doesn't exist or is not a directory
C:\Users\raben\Documents\PBI Custom Visuals\Projects\React\mantineVisual\node_modules@mantine\core\node_modules doesn't exist or is not a directory
C:\Users\raben\Documents\PBI Custom Visuals\Projects\React\mantineVisual\node_modules@mantine\node_modules doesn't exist or is not a directory
C:\Users\raben\Documents\PBI Custom Visuals\Projects\React\mantineVisual\node_modules\node_modules doesn't exist or is not a directory
If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
No response
Self-service
Beta Was this translation helpful? Give feedback.
All reactions