Skip to content
This repository was archived by the owner on Sep 15, 2022. It is now read-only.
This repository was archived by the owner on Sep 15, 2022. It is now read-only.

Unable to run sample code #11

@dwaynebradley

Description

@dwaynebradley

I'm not a nodejs person so please forgive me if what I'm trying to do is just simply not right... 😊

  1. Created a new test folder
  2. cd into the test folder
  3. Run the 2 npm install statements for @wapc/widl and @wapc/widl-codegen
  4. Copy the sample node code and place it into a file called test-as.js
  5. Run node test-as.js and get the following error:
❯ node test-as.js
internal/modules/cjs/loader.js:905
  throw err;
  ^

Error: Cannot find module 'tslib'
Require stack:
- /home/dwayne/git/dwaynebradley/test/node_modules/@wapc/widl/dist/cjs/index.js
- /home/dwayne/git/dwaynebradley/test/test-as.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/home/dwayne/git/dwaynebradley/test/node_modules/@wapc/widl/dist/cjs/index.js:4:17)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/dwayne/git/dwaynebradley/test/node_modules/@wapc/widl/dist/cjs/index.js',
    '/home/dwayne/git/dwaynebradley/test/test-as.js'
  ]
}

I see that tslib is a dev dependency for widl but that doesn't get installed when I run npm install @wapc/widl. What am I missing?

I am using nodejs v14.17.3 currently as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions