I’ve tried to reinstall my application from my distant server to my local machine, and I’m struggling with a ‘Cannot find module : path’ error since then which breaks my application client side.
I don’t understand the problem, please can someone help me with that, it seems that any code that is using : const path = require('path'); is not working.
Does any one something about that ?
Edit : Using meteor npm install --save path made it work, but if anyone can explain to me while path isn’t bundled, it would be cool
I’m getting the error on the client, and no error is shown on the server.
Yeah, I know that path is a native module in Node and I already have meteor-node-stubs@0.4.1 installed.
This is why I don’t understand it complains about not finding it on the client
Moreover, this worked previously on my distant machine, I just moved the code to my local one and it stopped working for no apparent reason.
I’ve written an NPM package calls handypixi which encapsulate PIXI, the NPM 2D library using path on the client, and there is a known issue about path not being bundled on the client available here.
However, this was working previously and I thought Meteor bundled any detected module directly on the client. Perhaps it does not detect native module used by NPM packages and thus do not bundle path directly ?
Erm, I may be wrong here: But considering the sandboxing any browser does for security reasons, I’m not seeing too much use for the path module on a client.
I’m using pixi through an NPM package my company developed which is importing Pixi itself.
The package is named handypixi and just provide regular abstraction on top of pixi.
I’m gonna do more test by removing the npm path package to see if it magically resolves, and get back at you.
Can you try using handypixi instead of pixi in your repro ?