Error office Cannot find module '.../v12.18.2/lib/node_modules/generator-office/node_modules/office-addin-manifest/lib/main.js'. Please verify that the package.json has a valid "main" entry
See original GitHub issuePrerequisites
> npm install -g yo generator-office
> yo office
Error office
Cannot find module '/Users/xxx/.nvm/versions/node/v12.18.2/lib/node_modules/generator-office/node_modules/office-addin-manifest/lib/main.js'. Please verify that the package.json has a valid "main" entry
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- I am running the latest version of Node and the tools
- I checked the documentation and found no answer
- I checked to make sure that this issue has not already been filed
Expected behavior
Expect normal execution and template generation
Current behavior
Failed to execute yo office
> yo office
Error office
Cannot find module '/Users/xxx/.nvm/versions/node/v12.18.2/lib/node_modules/generator-office/node_modules/office-addin-manifest/lib/main.js'. Please verify that the package.json has a valid "main" entry
Steps to Reproduce
- npm install -g yo generator-office
- yo office
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
- Operating System: macOS 10.15.4
- Node version: 12.18.2
- Office version: 16.93(20071300)
- Tool version: 1.5.5
Failure Logs
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:14
Top Results From Across the Web
Error: Cannot find module Please verify that the package.json ...
I got a similar error and fixed it by deleting node_modules and package-lock.json files and then run "npm install" to install dependencies.
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
I'm getting the error because I'm trying to import the freeCodeCamp icon from the react-icons package, which I don't have installed.
Read more >Fix Global Installs Not Working | "Cannot find module" error FIX
Getting " Cannot find module " after installing something globally (with -g)? Well, this video shows you how to fix global package /module ......
Read more >node:internal/modules/cjs/loader:936 throw err - You.com
cannot find internal module/cjs/loader:936 throw err, i have 2 folder backend and ... Please verify that the package.json has a valid "main" entry...
Read more >How to resolve "Cannot find module" error in Node - Sabe.io
json file at the root of the project. The Solution. To fix the Cannot find module error, simply install the missing modules using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK, I republished all the packages I published yesterday (including office-addin-manifest) without making any changes, but the versions will be bumped up one. Yo office is now working for me locally on three different machines.
Can you all please try the following:
I hope this fixes things for you.
Thanks,
Courtney
Awesome, glad to hear it! As far as I can tell, there just must have been some publishing hiccup to NPM yesterday that didn’t return any sort of error. I merely republished and this time it appears to have worked as expected