forcedotcom / lwc-dev-server-feedback

LWC Local Development
BSD 3-Clause "New" or "Revised" License
45 stars 10 forks source link

[MODULE_NOT_FOUND] @salesforce/lwc-dev-server/dist/cli/commands/force/lightning/lwc/start.d #98

Closed maaaaarco closed 3 years ago

maaaaarco commented 3 years ago

Describe the bug After installing the dev server everytime I run a CLI command I get this:

 @oclif/config loadJSON /Users/mzeuli/.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/package.json +0ms
(node:3603) [MODULE_NOT_FOUND] Error Plugin: @salesforce/lwc-dev-server: Cannot find module '/Users/mzeuli/.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/dist/cli/commands/force/lightning/lwc/start.d'
Require stack:
- /Users/mzeuli/.local/share/sfdx/client/7.84.2-a2868a68d5/node_modules/@oclif/config/lib/plugin.js
- /Users/mzeuli/.local/share/sfdx/client/7.84.2-a2868a68d5/node_modules/@oclif/config/lib/config.js
- /Users/mzeuli/.local/share/sfdx/client/7.84.2-a2868a68d5/node_modules/@oclif/config/lib/index.js
- /Users/mzeuli/.local/share/sfdx/client/7.84.2-a2868a68d5/node_modules/@oclif/command/lib/command.js
- /Users/mzeuli/.local/share/sfdx/client/7.84.2-a2868a68d5/node_modules/@oclif/command/lib/index.js
- /Users/mzeuli/.local/share/sfdx/client/7.84.2-a2868a68d5/dist/cli.js
- /Users/mzeuli/.local/share/sfdx/client/7.84.2-a2868a68d5/bin/sfdx.js
module: @oclif/config@1.17.0
task: toCached
plugin: @salesforce/lwc-dev-server
root: /Users/mzeuli/.local/share/sfdx/node_modules/@salesforce/lwc-dev-server
See more details with DEBUG=*

The dev server is working fine and also other commands.

Desktop (please complete the following information):

Additional context

$ sfdx --version
sfdx-cli/7.84.2-a2868a68d5 darwin-x64 node-v12.18.3
$ sfdx plugins --core
@oclif/plugin-autocomplete 0.3.0
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.5 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/analytics 0.23.0
@salesforce/lwc-dev-mobile 0.4.1
@salesforce/lwc-dev-server 2.9.0
├─ @oclif/plugin-update 1.3.9
└─ @oclif/plugin-help 2.2.1
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.5 (core)
analytics 1.12.1 (core)
auth 1.4.6 (core)
config 1.2.3 (core)
generator 1.1.3 (core)
salesforcedx 50.13.3 (core)
├─ user 1.0.5 (core)
├─ schema 1.0.3 (core)
├─ limits 1.0.2 (core)
├─ custom-metadata 1.0.11 (core)
├─ templates 50.4.0 (core)
├─ salesforce-alm 50.13.1 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
└─ apex 0.1.4 (core)
sfdx-cli 7.84.2 (core)
maaaaarco commented 3 years ago

I solved this by going into this direcotry, mentioned in the log: root: /Users/YOUR_USER_NAME/.local/share/sfdx/node_modules/@salesforce/lwc-dev-server I then deleted the node_modules folder and run a npm install --save-dev

softectonic commented 3 years ago

Hello @maaaaarco, I'm having exactly same issue (see below) and did exactly as you described above but still getting the error. Do you have any other suggestions?

(node:42520) [MODULE_NOT_FOUND] Error Plugin: @salesforce/lwc-dev-server: Cannot find module '/Users/softectonic/.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/dist/cli/commands/force/lightning/lwc/start.d'
Require stack:
- /Users/softectonic/.nvm/versions/node/v12.18.1/lib/node_modules/sfdx-cli/node_modules/@oclif/config/lib/plugin.js
- /Users/softectonic/.nvm/versions/node/v12.18.1/lib/node_modules/sfdx-cli/node_modules/@oclif/config/lib/config.js
- /Users/softectonic/.nvm/versions/node/v12.18.1/lib/node_modules/sfdx-cli/node_modules/@oclif/config/lib/index.js
- /Users/softectonic/.nvm/versions/node/v12.18.1/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/command.js
- /Users/softectonic/.nvm/versions/node/v12.18.1/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/index.js
- /Users/softectonic/.nvm/versions/node/v12.18.1/lib/node_modules/sfdx-cli/dist/cli.js
- /Users/softectonic/.nvm/versions/node/v12.18.1/lib/node_modules/sfdx-cli/bin/run
module: @oclif/config@1.17.0
task: toCached
plugin: @salesforce/lwc-dev-server
root: /Users/softectonic/.local/share/sfdx/node_modules/@salesforce/lwc-dev-server
See more details with DEBUG=*
CiaranShocks commented 3 years ago

Also getting this error.

(node:12772) [MODULE_NOT_FOUND] Error Plugin: @salesforce/lwc-dev-server: Cannot find module '/Users/cshaughnessy/.local/share/sfdx/node_modules/@salesforce/lwc-dev-server/dist/cli/commands/force/lightning/lwc/start.d' Require stack: -- /Users/cshaughnessy/.local/share/sfdx/client/7.94.3-a4e7c7955b/node_modules/@oclif/config/lib/plugin.js -- /Users/cshaughnessy/.local/share/sfdx/client/7.94.3-a4e7c7955b/node_modules/@oclif/config/lib/config.js -- /Users/cshaughnessy/.local/share/sfdx/client/7.94.3-a4e7c7955b/node_modules/@oclif/config/lib/index.js -- /Users/cshaughnessy/.local/share/sfdx/client/7.94.3-a4e7c7955b/node_modules/@oclif/command/lib/command.js -- /Users/cshaughnessy/.local/share/sfdx/client/7.94.3-a4e7c7955b/node_modules/@oclif/command/lib/index.js -- /Users/cshaughnessy/.local/share/sfdx/client/7.94.3-a4e7c7955b/dist/cli.js -- /Users/cshaughnessy/.local/share/sfdx/client/7.94.3-a4e7c7955b/bin/sfdx.js module: @oclif/config@1.17.0 task: toCached plugin: @salesforce/lwc-dev-server root: /Users/cshaughnessy/.local/share/sfdx/node_modules/@salesforce/lwc-dev-server See more details with DEBUG=*