Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running examples on Mac OS Monteray #142

Open
alin256 opened this issue Jan 9, 2022 · 1 comment
Open

Problem running examples on Mac OS Monteray #142

alin256 opened this issue Jan 9, 2022 · 1 comment

Comments

@alin256
Copy link

alin256 commented Jan 9, 2022

I have not run it for a while, but now on the new Mac OS (12.1) I am getting an error when running e.g.

node examples/leds.js 

Here is the error output:

node:internal/modules/cjs/loader:361
      throw err;
      ^

Error: Cannot find module '/Users/aliner/Documents/git/node-poweredup-main/node-poweredup/dist/node/index-node.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:353:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/aliner/Documents/git/node-poweredup-main/node-poweredup/examples/leds.js:7:19)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
    at Module.load (node:internal/modules/cjs/loader:975:32) {
  code: 'MODULE_NOT_FOUND',
  path: 'MYPATH/git/node-poweredup-main/node-poweredup/package.json',
  requestPath: '..'

I also get an issue if I try to run examples/web_bluetooth.html
It refers to ../dist/... which does not exist after the installation.

I might be missing something obvious, but readme did not answer my problems.

@alin256
Copy link
Author

alin256 commented Jan 9, 2022

After some looking into the code it seems that I should have run

npm build:all

This solves the issue above and the browser version seems to work (not every time), but this is perhaps another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant