Coder Social home page Coder Social logo

Comments (4)

mercs600 avatar mercs600 commented on June 18, 2024

@FENGLICHAO we have 'postcss-import' in our dependencies. Do you have all required packages ?

from vue2-perfect-scrollbar.

evsar3 avatar evsar3 commented on June 18, 2024

For some reason it didn't installed this dependency here too. I installed the package using this command:
npm i -S vue2-perfect-scrollbar

Then, to fix the issue I installed the missing dependency:
npm i -SD postcss-import

from vue2-perfect-scrollbar.

chrisjenx avatar chrisjenx commented on June 18, 2024

@mercs600 not sure if it's an NPM bug, but same issue, npm i vue2-perfect-scrollbar doesn't seem to pull down that dependency :/

from vue2-perfect-scrollbar.

breadadams avatar breadadams commented on June 18, 2024

Just ran into the same thing on build (during development it worked fine):

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: Cannot find module 'postcss-import'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/breadadams/dev/projectname/node_modules/vue2-perfect-scrollbar/postcss.config.js:2:21)
    at Module._compile (module.js:652:30)
    at requireFromString (/Users/breadadams/dev/projectname/node_modules/require-from-string/index.js:28:4)
    at parseJsFile (/Users/breadadams/dev/projectname/node_modules/postcss-load-config/node_modules/cosmiconfig/dist/loadJs.js:15:15)
    at <anonymous>
    at runLoaders (/Users/breadadams/dev/projectname/node_modules/webpack/lib/NormalModule.js:301:20)
    at /Users/breadadams/dev/projectname/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /Users/breadadams/dev/projectname/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/Users/breadadams/dev/projectname/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (/Users/breadadams/dev/projectname/node_modules/postcss-loader/src/index.js:208:9)
    at <anonymous>

 @ ./src/main.js 23:0-26
 @ ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js

The reason NPM isn't installing that dependency with the library is because it's marked as a devDependency, the solution would be to move it to dependencies.

from vue2-perfect-scrollbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.