Coder Social home page Coder Social logo

Comments (7)

niklr avatar niklr commented on June 16, 2024

maybe installing webpack globally helps:

npm install -g webpack
npm install -g webpack-dev-server

from angular-material-datatransfer.

zeusmoss avatar zeusmoss commented on June 16, 2024

after installing globally it showed couldn't find a module error


Error: Cannot find module 'webpack-cli/bin/config-yargs'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (...\AppData\Roaming\npm\node_modules\webpack-dev-server\bin\webpack-dev-server.js:65:1)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)

so i tried installing globally webpack-cli and got error cannot find module 'webpack' so i linked the webpack and now it shows this error.

C:\Users\xyz\AppData\Roaming\npm\node_modules\webpack\lib\webpack.js:165
                        throw new RemovedPluginError(errorMessage);
                        ^

Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.
    at Object.get [as CommonsChunkPlugin] (C:\Users\xyz\AppData\Roaming\npm\node_modules\webpack\lib\webpack.js:165:10)
    at Object.<anonymous> (C:\angular-material-datatransfer-master\webpack.config.js:7:42)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at WEBPACK_OPTIONS (C:\Users\xyz\AppData\Roaming\npm\node_modules\webpack-cli\bin\convert-argv.js:133:13)

also i tried to install on the existing project but it couldn't find it

$ npm install angular-material-datatransfer --save
npm ERR! code E404
npm ERR! 404 Not Found: angular-material-datatransfer@latest

from angular-material-datatransfer.

niklr avatar niklr commented on June 16, 2024

Did you follow those steps?

In order to build Angular Material Datatransfer, ensure that you have Git and Node.js installed.

Clone a copy of the repo:

git clone https://github.com/niklr/angular-material-datatransfer.git

Change to the angular-material-datatransfer directory:

cd angular-material-datatransfer

Install dependencies:

npm install

Use one of the following to build:

npm run build              # Builds into dist
npm run start              # Starts the webpack-dev-server + watching for changes

from angular-material-datatransfer.

zeusmoss avatar zeusmoss commented on June 16, 2024

yes i have git and node.js installed. previously i used the vs code to install and build also tried few of these too clean, clean-install , clean-start. didn't help.

I retired now everything using git cmd works fine now.

do you have a module of this so i can integrate on existing project? because i don't see it on the npm to install it.

from angular-material-datatransfer.

niklr avatar niklr commented on June 16, 2024

I just created a npm package, would be nice if you can test it.

https://www.npmjs.com/package/angular-material-datatransfer

from angular-material-datatransfer.

zeusmoss avatar zeusmoss commented on June 16, 2024

sure and it would be nice if you had a simple example on stackblitz or update readme file on what module to import in app module/ component

from angular-material-datatransfer.

niklr avatar niklr commented on June 16, 2024

With recent updates on Angular side it is now easier to create reusable libraries. To add this library as a module in an existing Angular project please consider the steps described here.

The corresponding npm package:
https://www.npmjs.com/package/angular-material-datatransfer-lib

from angular-material-datatransfer.

Related Issues (10)

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.