Npm install --production

I installed everything and got it working, but decided to move the userDir to something more suitable. I ran an npm install --production on the userDir to install the modules, but this is now throwing errors in the Debug output:

<install_path>\node-red-dashboard\dist\js\gridstack.min.map not found. Maybe running in dev mode. What can I do to remove this error from the Debug output?

.map file should only be needed for debug, so I'll need to see why its trying to want it when in production. Don't worry its just a warning, and won't break anything.

Ah, thanks for raising this.

I managed to totally bork my dev instance just before Christmas and on rebuilding, I installed with --production as well without really thinking through the consequences. I now get warnings like this both in the browser console and on the Node-RED log:

ui_base - error: { [Error: ENOENT: no such file or directory, stat 'C:\src\nr2\data\node_modules\node-red-dashboard\dist\js\gridstack.min.map']
  errno: -4058,
  code: 'ENOENT',
  syscall: 'stat',
  path:
   'C:\\src\\nr2\\data\\node_modules\\node-red-dashboard\\dist\\js\\gridstack.min.map',
  expose: false,
  statusCode: 404,
  status: 404 }

image

As Dave say's it is only a warning but annoying anyway.

Where should I file this as a bug? (I'm guessing on the git repo) --production should work without flooding the Debug Console. Before I fixed it, it wasn't that great of an experience debugging.

Already fixed in master

2 Likes