Помогите найти ошибку. Пытаюсь собрать проект с помощью parceljs, вылетает ошибка
C:\Users\79663\Desktop\learn\learn\constructor\src\styles\main.css:undefined:undefined: plugin is not a function
at LazyResult.run (C:\Users\79663\Desktop\learn\learn\constructor\node_modules\parcel-bundler\node_modules\postcss\lib\lazy-result.js:288:14)
at LazyResult.asyncTick (C:\Users\79663\Desktop\learn\learn\constructor\node_modules\parcel-bundler\node_modules\postcss\lib\lazy-result.js:212:26)
at C:\Users\79663\Desktop\learn\learn\constructor\node_modules\parcel-bundler\node_modules\postcss\lib\lazy-result.js:254:14
at new Promise (<anonymous>)
at LazyResult.async (C:\Users\79663\Desktop\learn\learn\constructor\node_modules\parcel-bundler\node_modules\postcss\lib\lazy-result.js:250:23)
at LazyResult.then (C:\Users\79663\Desktop\learn\learn\constructor\node_modules\parcel-bundler\node_modules\postcss\lib\lazy-result.js:131:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `parcel build ./src/index.html`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\79663\AppData\Roaming\npm-cache\_logs\2021-11-08T09_54_02_169Z-debug.log
Как написан скрипт в json
"scripts": {
"serve": "parcel ./src/index.html -p 4200 --open",
"build": "parcel build ./src/index.html"
},
Импорт css в index.js
import '../styles/main.css'
Ответы (1 шт):
Автор решения: VladaBelaya
→ Ссылка
Мне помогли эти две команды в консоли, чтобы исправить ошибку.
npm uninstall cssnano
npm i -D [email protected]
