xviz icon indicating copy to clipboard operation
xviz copied to clipboard

still Error: Cannot find module '../dist/es5'

Open wangchmcu opened this issue 2 years ago • 4 comments

I'm the first time to use AVS by trying the KITTI example data. But when I try to run the command: ./scripts/run-kitti-example.sh raised the error, even I had ran the command "yarn add -D @xviz/builder "Error: Cannot find module '../dist/es5'

ryan@ryan:~/Documents/xviz/xviz$ ./scripts/run-kitti-example.sh

XVIZ Server started.

Ctrl-c to terminate.

internal/modules/cjs/loader.js:1023 throw err; ^

Error: Cannot find module '../dist/es5' Require stack:

  • /home/ryan/Documents/xviz/xviz/modules/server/bin/xvizserver at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15) at Function.Module._load (internal/modules/cjs/loader.js:890:27) at Module.require (internal/modules/cjs/loader.js:1080:19) at require (internal/modules/cjs/helpers.js:72:18) at Object. (/home/ryan/Documents/xviz/xviz/modules/server/bin/xvizserver:51:1) at Module._compile (internal/modules/cjs/loader.js:1176:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10) at Module.load (internal/modules/cjs/loader.js:1040:32) at Function.Module._load (internal/modules/cjs/loader.js:929:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/ryan/Documents/xviz/xviz/modules/server/bin/xvizserver' ] }

My environment: OS: Ubuntu 22.04 yarn v1.22.19 node v14.1.0 (npm v6.14.4)

I also had tried node v10.16.3, cause I found you mention such problem in one of the issue tickets, but incompatible with some module:

ryan@ryan:~/Documents/xviz/xviz$ yarn yarn install v1.22.19 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.1.0". Got "10.16.3" error Found incompatible module. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

anyone can help me? thanks a lot

wangchmcu avatar Jul 04 '22 13:07 wangchmcu

I am having the same problem. Did you find a solution yet? @wangchmcu

ekurtgl avatar May 26 '23 23:05 ekurtgl

Same problem @wangchmcu @ekurtgl , Did you find a solution?

Blue-Knight-009 avatar Jan 13 '24 08:01 Blue-Knight-009

I followed these steps and it worked.

Node JS Installation

  1. (OPTIONAL - Apply this step if $ yarn bootstrap command fails in step 6.) Remove node, yarn related packages/files by following the commands here.

  2. Install nvm and see node 16.20.0 available:

    $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
    $ source ~/.bashrc
    $ nvm list-remote
    
  3. Install node v16.20.0 via:

    $ nvm install v16.20.0
    
  4. Install yarn via:

    $ npm i -g yarn
    
  5. Verify yarn installation via npm list -g yarn:

  6. Run yarn commands under xviz and streetscape.gl folders:

    (xviz)$ yarn
    (xviz)$ yarn bootstrap
    (streetscape.gl)$ yarn
    (streetscape.gl/examples/get-started)$ yarn
    (streetscape.gl/test/apps/viewer)$ yarn 
    

Node JS Installation Troubleshoot

If you get errors during yarn start-streaming-local in AVS installation section, consider running the following commands:

(xviz)$ npm i jq ⟶ This resolves the './dist/es5/node' error.
(xviz)$ yarn add jq -W ⟶ This resolves if `npm i jq` throws error.

ekurtgl avatar Jan 13 '24 15:01 ekurtgl

Thanks @ekurtgl ! I am trying this will update the thread with latest results.

Blue-Knight-009 avatar Jan 15 '24 06:01 Blue-Knight-009