When retrieving the dojo-util package from bower, the package is installed in a directory dojo-util/.., but when running the command line to create a custom build, it complains that the main.js file could not be found.
The file the compiler search for should be located in /util/build/main.js, but when installing with bower the dirname is /dojo-util/build/main.js.
Someone already had this problem ?
You can resolve this by instructing bower to install dojo-util as util:
bower install util=dojo-util#<version>
Or in bower.json's dependencies:
"util": "dojo-util#<version>"
Related
I am wondering if it is more appropriate to install #capacitor/android, #capacitor/ios, #capacitor/core as dev dependency
This package probably needs to be included in the build. I would not install it as a dev dependency.
In their Github's Readme file, they prompt you to use npm install #capacitor/android npm install #capacitor/core ,etc. Usually if the package can be installed as a dev dependency, they specify it in this command. (--save-dev or -D).
I have created a custom npm package library, I have successfully created it and published on npm and then installed the package using npm install <my-package-name>.
And now I am facing issue on importing the package.When I import it in app.module.ts file its shows:
Cannot find module 'my-module-name' or its corresponding type declarations.
I have also tried by deleting the node-modules and package-lock.json files and then npm install but sadly it's not works.
I have a asp.net core react app and using webpack for bundling .I have installed required dependencies but when build application it shows an error.
How could i resolve this error.
I have installed required dependencies so many times done npm cache clean and restarted a machine.still its showing not installed in vs solution explorer.
webpack installed in requied folder.
IN vs solution
when try to restore package inside solution explorer,its not installed.
webpack-cli is missing
You doing wrong in your npm install
Should be this command for global
npm i -g webpack-cli
or this command for local
npm i -D webpack-cli
You can not mix up between -D -g flag
If that didn't work for you try to right click on that package and click restore
Update:
Try to delete package-lock.json then run npm i -D webpack-cli again
Is it possible to install nodejs packages (/modules) from files like in ruby's Gemfile as done with bundle install or python's requirements file (eg: requirements.pip) as done using pip install -r commands ?
Say I have a file where three or four package names are listed.
How would I instruct npm to install packages whose names are found in that file (and resolve dependencies which it also does)?
Just create your package JSON, you can use yarn to manage your packages instead of npm, it's faster.
Inside your package you can create a section of scripts accessed by npm run
scripts: {
customBuild: 'your sh code/ruby/script whateve'
}
And after you can run on terminal, npm run customBuild for example
you can use NPM init to create a package.json file which will store the node packages your application is dependent on, then use npm install which will install the node packages indicated in the package.json file
I am getting a .js file when I call npm install with my package and typescript configuration json file. How is it generating the .js file?
You can build the current package/project with:
npm build
The command you're mentioning is for installing all the dependencies of your package, declared in the package.json