简体   繁体   中英

Running Nodemon on IBM Power System i

I am new to node development on power system i, was trying to get nodemon to work but errors out with following:

# nodemon.js

[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
[nodemon] Internal watch failed: watch ENOSYS

My application uses express, ejs and body-parser, works well outside of nodemon. First off, I couldn't get nodemon to be installed globally so I put that on my application node_modules directory and set the path, which is not what I usually do in other environments. How does npm install -g suppose to work on system i? Any help on this greatly appreciated! Thanks!

My environment is:

(node: v6.9.1)
(npm:3.10.8)
(OS:  V7R1)
Path: /QOpenSys/QIBM/ProdData/OPS/Node6/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/home/QSECOFR/projects/mytasklist/node_modules/nodemon/bin
LIBPath: /QOpenSys/QIBM/ProdData/OPS/Node6/bin:/home/QSECOFR/projects/mytasklist/node_modules/nodemon/bin

After days of searching, I think I found a solution. I wasn't able to run directly Nodemon by typing

nodemon src/app.js

So on Node14 I found a workaround, adding a script line in package.json

 ... ,
  "main": "./src/app.js",
  "scripts": {
    ...,
    "serve": "nodemon -L"
  },

Then run your application by typing npm run serve

And voilà !

It seems to run in legacy mode.

Note: In node 10 this worked too (but not in node 14) even if my main file is src/app.js

"serve": "nodemon server.js"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM