I’m not yet friendly with both Ionic and with the angularJS programming language, I have to migrate a web project into Ionic, this project works with a web service but it’s hosted on my local machine, so, I can’t create an online application.
I found this nice tutorial, but I fail at running the application and at emulating.
I edited the page src\pages\home\home.html and I put this code :
By running the project via the command line ionic serve; the page isn’t updated, I still have the initial content.
By running the command line ionic cordova build android, I have the following error message : Error: EPERM: operation not permitted, open ‘C:\IonicProjects\ESS\www\build\main.js’
Please post the complete output of the command that outputs the error with an added --verbose parameter.
Your problem is probably with npm, something to do with permissions and files. This happens quite often and is almost impossible to successfully debug (at least here in the forum).
One solution: Uninstall your node, install nvm (or nvm-windows when you are using Windows), install a new node with this, then install ionic and cordova again and try your command again. The problem should be gone.
Hello, for a reason I misunderstand, everything works fine once I ran the command line ionic serve --verbose, I uninsulated nothing and installed nothing.
Many thanks
In the description of the DoConnection function, I simply want to read the 2 input fields value. I won’t make the connection for now as it will be done with a library implemented by a workmate.
With this code, the click on the Connection button doesn’t work, actually, nothing happens, I can’t see why
One solution: Uninstall your node, install nvm (or nvm-windows if you are on Windows), install a new node (which includes npm) with this, then install ionic and cordova again and try your command again. The problem should be gone.
nothing new, I will have to run command prompt as an administrator, here you have the versions of different components :
npm → 5.3.0
cordova → 7.0.1
ionic → 3.9.2
If I run the command line ionic serve without administrator privilege, I get these messages with errors :
[INFO] Starting app-scripts server: --address 0.0.0.0 --port 8100
–livereload-port 35729 - Ctrl+C to cancel
[14:22:05] watch started …
[14:22:05] build dev started …
[14:22:05] clean started …
[14:22:05] copy started …
[14:22:05] transpile started …
[14:22:12] transpile finished in 6.39 s
[14:22:12] preprocess started …
[14:22:12] deeplinks started …
[14:22:12] deeplinks finished in 21 ms
[14:22:12] preprocess finished in 28 ms
[14:22:12] webpack started …
{ Error: Failed to clean directory C:\IonicProjects\ESS\www\build - EPERM: operation not permitted, unlink ‘C:\IonicProjects\ESS\www\build\main.css’
at new BuildError (C:\IonicProjects\ESS\node_modules@ionic\app-scripts\dist\util\errors.js:16:28)
at C:\IonicProjects\ESS\node_modules@ionic\app-scripts\dist\clean.js:15:32
at Promise ()
at Object.clean (C:\IonicProjects\ESS\node_modules@ionic\app-scripts\dist\clean.js:7:12)
at buildProject (C:\IonicProjects\ESS\node_modules@ionic\app-scripts\dist\build.js:94:13)
at C:\IonicProjects\ESS\node_modules@ionic\app-scripts\dist\build.js:47:16
at hasBeenLogged: false, isFatal: false }
[14:22:12] Failed to copy C:\IonicProjects\ESS\src\index.html to C:\IonicProjects\ESS\www\index.html
{ Error: EPERM: operation not permitted, open ‘C:\IonicProjects\ESS\www\index.html’
errno: -4048,
code: ‘EPERM’,
syscall: ‘open’,
path: ‘C:\IonicProjects\ESS\www\index.html’ }
[14:22:12] Failed to copy C:\IonicProjects\ESS\node_modules\ionic-angular\polyfills\polyfills.js to
C:\IonicProjects\ESS\www\build\polyfills.js
[14:22:12] Failed to copy C:\IonicProjects\ESS\node_modules\sw-toolbox\sw-toolbox.js to
C:\IonicProjects\ESS\www\build\sw-toolbox.js
[14:22:12] Failed to copy C:\IonicProjects\ESS\node_modules\ionicons\dist\fonts\ionicons.woff to
C:\IonicProjects\ESS\www\assets\fonts\ionicons.woff
[14:22:12] Failed to copy C:\IonicProjects\ESS\node_modules\ionicons\dist\fonts\ionicons.woff2 to
C:\IonicProjects\ESS\www\assets\fonts\ionicons.woff2
[14:22:12] Failed to copy C:\IonicProjects\ESS\node_modules\ionic-angular\fonts\ionicons.woff to
C:\IonicProjects\ESS\www\assets\fonts\ionicons.woff
[14:22:12] Failed to copy C:\IonicProjects\ESS\node_modules\ionic-angular\fonts\ionicons.woff2 to
C:\IonicProjects\ESS\www\assets\fonts\ionicons.woff2
[14:22:12] Failed to copy C:\IonicProjects\ESS\src\assets\icon\favicon.ico to
C:\IonicProjects\ESS\www\assets\icon\favicon.ico
[14:22:29] dev server running: http://localhost:8101/
Yes, you created a your build with an admin process before, now you have to do that all the time.
Try a new checkout of your project and build there - should probably work.