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

Very Much Error in run #135

Closed
ajavaer opened this issue Mar 13, 2022 · 2 comments
Closed

Very Much Error in run #135

ajavaer opened this issue Mar 13, 2022 · 2 comments

Comments

@ajavaer
Copy link

ajavaer commented Mar 13, 2022

my use

import { Save16 } from "carbon-icons-svelte";

erro such as

ERROR in ./node_modules/carbon-icons-svelte/lib/index.js 7025:0-71
Module not found: Error: Can't resolve './VolumeFileStorage24' in 'G:\Webstorm\write\Test\node_modules\carbon-icons-svelte\lib'
Did you mean 'index.js'?
BREAKING CHANGE: The request './VolumeFileStorage24' 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.
@ ./src/pages/book/components/Test.svelte 44:0-45 95:10-16 1132:2-8

....

...
...

...

ERROR in ./node_modules/carbon-icons-svelte/lib/index.js 7762:0-55
Module not found: Error: Can't resolve './_4KFilled32' in 'G:\Webstorm\write\Test\node_modules\carbon-icons-svelte\lib'
Did you mean 'index.js'?
BREAKING CHANGE: The request './_4KFilled32' 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.

webpack 5.70.0 compiled with 7762 errors and 4 warnings in 140617 ms

my package.json

"dependencies": {
"@capacitor/android": "^2.4.7",
"@capacitor/cli": "^2.4.7",
"@capacitor/core": "^2.4.7",
"@codexteam/shortcuts": "^1.1.1",
"@editorjs/delimiter": "^1.2.0",
"@editorjs/editorjs": "^2.22.2",
"@editorjs/header": "^2.6.2",
"@editorjs/list": "^1.6.2",
"@editorjs/marker": "^1.2.2",
"@editorjs/paragraph": "^2.8.0",
"@editorjs/quote": "^2.4.0",
"@editorjs/underline": "^1.0.0",
"@itech-indrustries/editorjs-callout": "^1.0.0",
"@livingdocs/editable.js": "^3.0.7",
"animate.css": "^4.1.1",
"animejs": "^3.2.1",
"caret-pos": "^2.0.0",
"editorjs-alert": "^1.0.3",
"editorjs-break-line": "^0.2.1",
"editorjs-drag-drop": "^1.0.0",
"editorjs-inline-font-size-tool": "^1.0.1",
"editorjs-style": "^3.0.2",
"editorjs-text-alignment-blocktune": "^1.0.3",
"editorjs-text-color-plugin": "^1.1.22",
"editorjs-tooltip": "^1.1.0",
"editorjs-undo": "^1.0.1",
"findandreplacedomtext": "^0.4.6",
"holmes.js": "^1.17.3",
"hotkeys-js": "^3.8.7",
"hover.css": "^2.3.2",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"lunr": "^2.3.9",
"marked": "^4.0.5",
"moment": "^2.29.1",
"mousetrap": "^1.6.5",
"node-fetch": "^2.6.1",
"nzh": "^1.0.5",
"omnia-ebook-generator": "^0.2.1",
"omnia-editor": "^0.1.0",
"rxjs": "^7.4.0",
"semver": "^7.3.5",
"sortablejs": "^1.13.0",
"sveltejs-tippy": "^3.0.0",
"time-stamp": "^2.2.0",
"tippy.js": "^6.3.7",
"uuid": "^8.3.2"
},
"devDependencies": {
"@babel/core": "^7.13.10",
"@babel/preset-env": "^7.13.12",
"@carbon/charts-svelte": "^0.53.5",
"@editorjs/footnotes": "^1.1.0",
"@storybook/addon-actions": "^6.1.21",
"@storybook/addon-essentials": "^6.1.21",
"@storybook/addon-links": "^6.1.21",
"@storybook/preset-scss": "^1.0.3",
"@storybook/svelte": "^6.1.21",
"@testing-library/jest-dom": "^5.11.10",
"@testing-library/svelte": "^3.0.3",
"@testing-library/user-event": "^12.8.3",
"@types/file-saver": "^2.0.1",
"@types/findandreplacedomtext": "^0.4.1",
"@types/jest": "^26.0.22",
"@types/lodash": "^4.14.178",
"@types/lunr": "^2.3.4",
"@types/uuid": "^8.3.3",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"appwrite": "^2.0.0",
"autoprefixer": "^10.4.0",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"carbon-components-svelte": "^0.50.1",
"carbon-icons-svelte": "^10.38.0",
"carbon-preprocess-svelte": "^0.6.0",
"cross-env": "^7.0.3",
"css-loader": "^4.3.0",
"d3": "^7.2.1",
"date-fns": "^2.19.0",
"electron": "^11.4.1",
"electron-builder": "^22.13.1",
"electron-winstaller": "^5.0.0",
"eslint": "^8.4.1",
"eslint-plugin-svelte3": "^2.7.3",
"file-loader": "^6.2.0",
"file-saver": "^2.0.5",
"husky": "^4.3.8",
"jest": "^26.6.3",
"jest-transform-svelte": "^2.1.1",
"license-checker": "^25.0.1",
"mini-css-extract-plugin": "^0.11.3",
"normalize.css": "^8.0.1",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.5",
"postcss-loader": "^6.2.1",
"prettier": "^2.2.1",
"prettier-plugin-svelte": "^1.4.2",
"sass": "^1.32.8",
"sass-loader": "^10.1.1",
"style-loader": "^1.3.0",
"svelte": "^3.35.0",
"svelte-htm": "^1.1.1",
"svelte-i18n": "^3.3.7",
"svelte-jester": "^1.3.2",
"svelte-loader": "^3.1.2",
"svelte-preprocess": "^4.10.0",
"svelte-spa-router": "^3.1.0",
"ts-loader": "^9.2.6",
"typescript": "^4.5.4",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.7.2",
"workbox-webpack-plugin": "^5.1.4",
"workbox-window": "^5.1.4"
}

my webpack.config.js

const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const Autoprefixer = require("autoprefixer")
const path = require("path");
const mode = process.env.NODE_ENV || "development";
const isProduction = mode === "production";
const isDevelopment = !isProduction;
module.exports = {
entry: {
bundle: ["./src/main.js"]
},
resolve: {
alias: {
svelte: path.resolve("node_modules", "svelte" ),
src: path.resolve(__dirname, 'src')
},
extensions: [".mjs", ".js", ".svelte",'.tsx', '.ts'],
mainFields: ["svelte", "browser", "module", "main"]
},
output: {
clean: true,
path: __dirname + "/public/build",
publicPath: '/build/',
filename: "[name].js",
chunkFilename: "bundle.[name].js"
},
module: {
rules: [
{
test: /.svelte$/,
use: {
loader: "svelte-loader",
options: {
compilerOptions: {
dev: isDevelopment
},
emitCss: isProduction,
preprocess: require("svelte-preprocess")({
scss: true,
sass: true,
postcss: {
plugins: [
Autoprefixer
]
}
}),
}
}
},
{
test: /.(sa|sc|c)ss$/,
use: [
/**
* MiniCssExtractPlugin doesn't support HMR.
* For developing, use 'style-loader' instead.
* */
isProduction ? MiniCssExtractPlugin.loader : "style-loader",
"css-loader",
"sass-loader"
]
},
{
test: /.ts$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
devServer: {
static: {
directory: path.join(__dirname, 'public'),
},
compress: true,
hot: false,
liveReload: true,
open: true,
},
plugins: [
new MiniCssExtractPlugin({
filename: "[name].css"
}),
],
mode,
devtool: isProduction ? false : "source-map"
};

@metonym
Copy link
Collaborator

metonym commented Mar 13, 2022

Can you try the following import?

import Save16 from "carbon-icons-svelte/lib/Save16";

@ajavaer
Copy link
Author

ajavaer commented Mar 15, 2022

thanks,it is ok now but i don`t know why. Maybe I had bad luck that day

@metonym metonym closed this as completed May 27, 2022
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