Skip to content

Please Fix the following issue I was having when running npm start in sample \4-AccessControl\2-security-groups #100

Closed

Description

npm start
node server.js

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

Error: Cannot find module 'D:\WORKSPACE\AAD\aad-nodejs-groups\4-AccessControl\2-security-groups\App\node_modules\msal-node-wrapper\dist\index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:308:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:521:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:872:27)
at Function.Module._load (internal/modules/cjs/loader.js:730:27)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (D:\WORKSPACE\AAD\aad-nodejs-groups\4-AccessControl\2-security-groups\App\app.js:9:32)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32) {
code: 'MODULE_NOT_FOUND',
path: 'D:\WORKSPACE\AAD\aad-nodejs-groups\4-AccessControl\2-security-groups\App\node_modules\msal-node-wrapper\package.json',
requestPath: 'msal-node-wrapper'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! msal-node-tutorial-security-groups@1.0.0 start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the msal-node-tutorial-security-groups@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Activity

  1. github-actions commented on Sep 28, 2023

    @github-actions

    This issue has not seen activity in 14 days. If your issue has not been resolved please leave a comment to keep this open. It will be closed in 7 days if it remains stale.

  2. change716 commented on Oct 3, 2023

    @change716

    npm start
    node server.js

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

    Error: Cannot find module 'D:\WORKSPACE\AAD\aad-nodejs-groups\4-AccessControl\2-security-groups\App\node_modules\msal-node-wrapper\dist\index.js'. Please verify that the package.json has a valid "main" entry at tryPackage (internal/modules/cjs/loader.js:308:19) at Function.Module._findPath (internal/modules/cjs/loader.js:521:18) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:872:27) at Function.Module._load (internal/modules/cjs/loader.js:730:27) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (D:\WORKSPACE\AAD\aad-nodejs-groups\4-AccessControl\2-security-groups\App\app.js:9:32) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) { code: 'MODULE_NOT_FOUND', path: 'D:\WORKSPACE\AAD\aad-nodejs-groups\4-AccessControl\2-security-groups\App\node_modules\msal-node-wrapper\package.json', requestPath: 'msal-node-wrapper' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! msal-node-tutorial-security-groups@1.0.0 start: node server.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the msal-node-tutorial-security-groups@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    You can first refer to this website , and then follow the three steps below to obtain the results.

    1. cd ms-identity-javascript-nodejs-tutorial/Common/msal-node-wrapper
    2. npm install
    3. npm run build
    xxx@MacBook-Pro msal-node-wrapper % npm install
    xxx@MacBook-Pro msal-node-wrapper % npm run build
    > msal-node-wrapper@1.0.0-beta build
    > rollup -c --strictDeprecations --bundleConfigAsCjs
    src/index.ts → dist...
    created dist in 1.1s
    src/index.ts → dist...
    created dist in 778ms
    

    Then go back to the 4-AccessControl/2-security-groups/App folder
    and npm start

    xxx@MacBook-Pro App % npm start
    > msal-node-tutorial-security-groups@1.0.0 start
    > node server.js
    
  3. github-actions commented on Oct 18, 2023

    @github-actions

    This issue has not seen activity in 14 days. If your issue has not been resolved please leave a comment to keep this open. It will be closed in 7 days if it remains stale.

  4. kashifmakhdoom commented on Oct 19, 2023

    @kashifmakhdoom
    Author

    Issue resolved. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions