I’m new here. That said, I can’t find a copy of this question, and I think it’s a pretty basic, “Hey, this is broken and I don’t know how to fix it,” kinda thing. I apologize if it is a duplicate.
I’m working with a Windows 7 Pro machine. I have NPM installed. I have Ionic installed. I have run the basic tutorial / startup stuff, and gotten it working. I want to work with a bluetooth device, so I ran the following line:
ionic start [projectname]
I say ‘Y’ to integrating cordova, because I want it. So it runs the next step I planned on running on its own:
ionic integrations enable cordova --quiet
I then run these two lines of code:
ionic cordova plugin add cordova-plugin-bluetooth-serial
npm install --save @ionic-native/bluetooth-serial
And try to go into the directory [projectname] and run:
I get this in response, all three times I’ve followed the instructions:
Error: Cannot find module '[projdir]\node_modules@ionic\app-scripts’
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. ([userdir]npm\node_modules\io
at Generator.next ()
at new Promise ()
at Object.__awaiter ([userdir]\npm\node_modules\ioni
at Object.importAppScripts ([userdir]\npm\node_modul
I have reinstalled NPM. I have installed updates to Ionic. I updated TypeScript. I’ve searched for a place where this package was linked to this error was commented on. I’m not sure where to go to do my due diligence, but I have this problem and would like to know how to fix it. I guess there might be some basic dependency debugging links I could dig up, but… It seems a standard, simple line of actions that should all fit together.
Help? Hints? Starter guides I should read beyond the first twenty pages I’ve looked at?
Note: upon running an ‘npm install’ command in the directory, the application now serves properly. It would be nice to know when I need to run this install, I think. But more than that it seems the docs are a little off when it comes to describing addition of packages into a project. I followed instructions and still needed to put a bunch more stuff into my project.