Closed pugzangpangalan closed 5 years ago
checking on the version of axios on node_modules it is currently installed.
/node_modules$ npm view axios version 0.18.0
but if i try to access it on localhost:8080
it is still have an error
external "axios":1 Uncaught ReferenceError: axios is not defined
Did you run webpack and have it complete the build? Any results there?
how do i do that?
If you only added it to the package.json without running npm install
it would not do anything. Another way of doing it is to run npm install --save axios
. Doing that will install and add it to your package.json for you.
frontend-maven-plugin
is the secret sauce to running nodeJS commands inside your maven build.
To use the version of Node + NPM + Webpack as configured in the project, do this:
$ cd basic
$ ./mvnw frontend:install-node-and-npm
$ ./mvnw frontend:npm
$ ./mvnw frontend:webpack
Feel free to reopen if you need further assistance with building JS artifacts.
If you only added it to the package.json without running
npm install
it would not do anything. Another way of doing it is to runnpm install --save axios
. Doing that will install and add it to your package.json for you.
I used this command to install axios it installed successfully but it is not adding or showing the dependency in package.json
hi,
i am currently trying to add axios as a dependencies, but every time I add it as require('axios '). it will give me and error stating "axios is not defined".
below is my package.json snippet
"dependencies": { "react": "^15.3.2", "react-dom": "^15.3.2", "rest": "^1.3.1", "webpack": "^1.12.2", "axios": "^0.16.2" },