Importing vue-design-system on a new project created with vue-cli fails with this error:
Building for production...Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
⠸ Building for production...
ERROR Failed to compile with 1 errors 3:48:37 PM
error in /home/ufo/workspaces/wp/wp-design-system/dist/system/system.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Loading PostCSS Plugin failed: Cannot find module 'postcss-import'
(@/home/ufo/workspaces/wp/wp-design-system/.postcssrc.js)
at load (/home/ufo/workspaces/wp/src/ui/frontend/node_modules/postcss-load-config/src/plugins.js:21:13)
at Object.keys.filter.map (/home/ufo/workspaces/wp/src/ui/frontend/node_modules/postcss-load-config/src/plugins.js:53:16)
at Array.map (<anonymous>)
at plugins (/home/ufo/workspaces/wp/src/ui/frontend/node_modules/postcss-load-config/src/plugins.js:52:8)
at config.load.then (/home/ufo/workspaces/wp/src/ui/frontend/node_modules/postcss-load-config/src/index.js:72:18)
at runLoaders (/home/ufo/workspaces/wp/src/ui/frontend/node_modules/webpack/lib/NormalModule.js:301:20)
at /home/ufo/workspaces/wp/src/ui/frontend/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/ufo/workspaces/wp/src/ui/frontend/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/home/ufo/workspaces/wp/src/ui/frontend/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Promise.resolve.then.then.catch (/home/ufo/workspaces/wp/src/ui/frontend/node_modules/postcss-loader/src/index.js:208:9)
@ ./src/main.ts 6:0-49
@ multi ./src/main.ts
We have the very same issue in three different machines (two ubuntu 18.04 64bit, one MacOS).
What we did:
cloned locally this repository (we tried master and 3.5.7 branch)
changed the package name in package.json file from 'vue-design-system' to 'wp-design-system'
executed: npm install && npm run build:system
in another folder, we generated a new vuejs project with vue-cli
in the package.json of the new project we added as dependency: "wp-design-system": "file:./../../wp-design-system"
npm install in the new project -> it works
added to the main file in the vuejs project:
import DesignSystem from 'wp-design-system';
import 'wp-design-system/dist/system/system.css';
Vue.use(DesignSystem);
execute in the vuejs project: npm run build -> this fails and complains about postcss-import
Importing vue-design-system on a new project created with vue-cli fails with this error:
We have the very same issue in three different machines (two ubuntu 18.04 64bit, one MacOS).
What we did:
npm install && npm run build:system
npm install
in the new project -> it worksnpm run build
-> this fails and complains about postcss-import