usnistgov / ndn-dpdk

NDN-DPDK: High-Speed Named Data Networking Forwarder
https://www.nist.gov/publications/ndn-dpdk-ndn-forwarding-100-gbps-commodity-hardware
Other
131 stars 26 forks source link

installation Error 1: Cannot find package 'json-stable-stringify' #15

Closed Code-shaker closed 3 years ago

Code-shaker commented 3 years ago
vmadmin@vm22:~/ndn-dpdk$ NDNDPDK_MK_RELEASE=1 make
mk/update-list.sh
bash -c 'source mk/cflags.sh; meson build'
The Meson build system
Version: 0.58.1
Source dir: /home/vmadmin/ndn-dpdk
Build dir: /home/vmadmin/ndn-dpdk/build
Build type: native build
Project name: NDN-DPDK
Project version: undefined
C compiler for the host machine: gcc (gcc 9.3.0 "gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C linker for the host machine: gcc ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency libdpdk found: YES 21.05.0
Has header "spdk/thread.h" : YES 
Program mk/cgoflags.sh found: YES (/home/vmadmin/ndn-dpdk/mk/cgoflags.sh)
Program mk/cgostruct.sh found: YES (/home/vmadmin/ndn-dpdk/mk/cgostruct.sh)
Program mk/cgotest.sh found: YES (/home/vmadmin/ndn-dpdk/mk/cgotest.sh)
Program mk/schema/build.sh found: YES (/home/vmadmin/ndn-dpdk/mk/schema/build.sh)
Program mk/bpf.sh found: YES (/home/vmadmin/ndn-dpdk/mk/bpf.sh)
Has header "bpf/bpf_helpers.h" : YES 
Build targets in project: 6

Found ninja-1.10.0.git.kitware.jobserver-1 at /usr/local/bin/ninja
go generate ./container/fib/fibdef
go: downloading github.com/pkg/math v0.0.0-20141027224758-f2ed9e40e245
go: downloading github.com/graphql-go/graphql v0.7.9
go: downloading go.uber.org/zap v1.17.0
go: downloading go4.org v0.0.0-20201209231011-d4a079459e60
go: downloading github.com/jfoster/binary-utilities v0.2.1
go: downloading inet.af/netstack v0.0.0-20210622165351-29b14ebc044e
go: downloading golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
go: downloading github.com/tul/emission v0.0.0-20180606124623-7d2aae804ca2
go: downloading github.com/EGT-Ukraine/go2gql v0.0.0-20190528134259-79533208556f
go: downloading github.com/bhoriuchi/graphql-go-tools v0.2.0-beta1
go: downloading github.com/functionalfoundry/graphqlws v0.0.0-20200611113535-7bc58903ce7b
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading go.uber.org/multierr v1.7.0
go: downloading go.uber.org/atomic v1.8.0
go: downloading github.com/google/uuid v1.2.0
go: downloading github.com/gorilla/websocket v1.4.2
go: downloading github.com/x-cray/logrus-prefixed-formatter v0.5.2
go: downloading github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
go: downloading golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/mattn/go-isatty v0.0.13
go: downloading golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
go generate ./ndni
go generate ./iface
go generate ./container/cs
go generate ./app/tgconsumer
go generate ./app/tgproducer
ninja -C build
ninja: Entering directory `build'
[61/61] Linking static target libndn-dpdk-c.a
ninja -C build cgoflags cgostruct cgotest schema
ninja: Entering directory `build'
[0/4] Running external command cgoflags (wrapped by meson to set env)
[1/4] Running external command cgostruct (wrapped by meson to set env)
[2/4] Running external command cgotest (wrapped by meson to set env)
[3/4] Running external command schema (wrapped by meson to set env)
node:internal/process/esm_loader:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'json-stable-stringify' imported from /home/vmadmin/ndn-dpdk/mk/schema/make-jrgen.js
    at new NodeError (node:internal/errors:363:5)
    at packageResolve (node:internal/modules/esm/resolve:712:9)
    at moduleResolve (node:internal/modules/esm/resolve:753:18)
    at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:867:11)
    at Loader.resolve (node:internal/modules/esm/loader:89:40)
    at Loader.getModuleJob (node:internal/modules/esm/loader:242:28)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:73:40)
    at link (node:internal/modules/esm/module_job:72:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}
while executing ['/home/vmadmin/ndn-dpdk/mk/schema/build.sh']
FAILED: meson-schema 
/usr/local/bin/meson --internal exe --unpickle /home/vmadmin/ndn-dpdk/build/meson-private/meson_exe_build.sh_3cd54e1b1961d5b340c1b4f301556acddf8c7218.dat
ninja: build stopped: subcommand failed.
make: *** [Makefile:46: build/cgodeps.done] Error 1
yoursunny commented 3 years ago

Did you run npm install command, which is build steps step 2? If so, did that command complete successfully, or is there any errors (you can ignore warnings)?

Code-shaker commented 3 years ago

The second step to npm install was complete, I am not sure if there are any errors.

But if I run again npm install I got some errors:

ENOENT
npm ERR! syscall open
npm ERR! path /home/vmadmin/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/vmadmin/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vmadmin/.npm/_logs/2021-07-06T14_39_02_971Z-debug.log
yoursunny commented 3 years ago

You cloned NDN-DPDK codebase in /home/vmadmin/ndn-dpdk directory:

Source dir: /home/vmadmin/ndn-dpdk

You are running npm install in /home/vmadmin directory:

ENOENT: no such file or directory, open '/home/vmadmin/package.json'

You need to run npm install in /home/vmadmin/ndn-dpdk directory instead. Error message contains the string ERR!, and is shown in red if colors are enabled.

You can run npm install (in the correct directory) again. If there were errors, they would occur again. If necessary, you can cleanup NPM related temporary files with rm -rf package-lock.json node_modules.

Code-shaker commented 3 years ago

Ohh yes I use the wrong direction, sry I mix up.

npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.

added 774 packages, and audited 775 packages in 19s

105 packages are looking for funding
  run `npm fund` for details

5 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
# npm audit report

glob-parent  <5.1.2
Severity: moderate
Regular expression denial of service - https://npmjs.com/advisories/1751
No fix available
node_modules/xo/node_modules/glob-parent
  fast-glob  <=2.2.7
  Depends on vulnerable versions of glob-parent
  node_modules/xo/node_modules/fast-glob
    globby  8.0.0 - 9.2.0
    Depends on vulnerable versions of fast-glob
    node_modules/xo/node_modules/globby
      xo  >=0.20.0
      Depends on vulnerable versions of globby
      node_modules/xo
        @yoursunny/xo-config  *
        Depends on vulnerable versions of xo
        node_modules/@yoursunny/xo-config

5 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.
yoursunny commented 3 years ago

Ohh yes I use the wrong direction, sry I mix up.

There's no error in the npm install output. You don't need to worry about audit advisories, because they don't handle inputs from the network.

After a successful npm install, is the original make error resolved?

Code-shaker commented 3 years ago

Yes it works, thanks for your time to resolve and help.