I am developing a web application using angular and a few other libraries (including pixi.js), and I am trying to move the project onto a new machine. The project works on my old machine, but I'm having difficulties getting it to work on this new machine.
I moved across the project directly, which includes the package.json
file and ran both npm install --only=dev
and npm install
. I then tried to start my application by running npm start
. Everything worked well, my angular modules compiled successfully, but I got a bunch of errors that said:
ERROR in C:/.../.../.../.../.../.../.../pixi.component.ts (85,25): Identifier 'PIXI' must be imported from a module)
I got quite a few like this, basically every file where I used the identifier PIXI
(for example var x = new PIXI.Point()
) would throw an error.
I reiterate that this all works fine on my old machine, the node environment and code base is all the same. Anyways, I tried explicitly importing the namespace by adding import { PIXI } from 'pixi.js'
. This threw an error in visual studio, saying cannot find module pixi.js
.
I checked to see that the module was installed by using npm ls
and I definitely have pixi.js 4.3.0
installed along with all my other modules. But for some reason it can't be found.
What could be causing this problem?