Skip to content

Error: Cannot find module 'package.json' #1898

Closed
@ThomasKnobloch

Description

@ThomasKnobloch
  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Mac OS X 10.11.5 (El Capitan)
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.11-webpack.8
    node: 6.5.0
    os: darwin x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    clone from repository
    npm install --save-dev angular-cli@webpack
    ng version
  4. The log given by the failure. Normally this include a stack trace and some
    more information.
Cannot find module 'package.json'
Error: Cannot find module 'package.json'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at AddonDiscovery.discoverAtPath (/Users/thomasknobloch/workspace/OXEWbm2/wbm/node_modules/angular-cli/lib/models/addon-discovery.js:205:20)
    at AddonDiscovery.<anonymous> (/Users/thomasknobloch/workspace/OXEWbm2/wbm/node_modules/angular-cli/lib/models/addon-discovery.js:114:26)
    at Array.map (native)
    at AddonDiscovery.discoverFromDependencies (/Users/thomasknobloch/workspace/OXEWbm2/wbm/node_modules/angular-cli/lib/models/addon-discovery.js:109:68)
    at AddonDiscovery.discoverProjectAddons (/Users/thomasknobloch/workspace/OXEWbm2/wbm/node_modules/angular-cli/lib/models/addon-discovery.js:48:29)
    at Project.discoverAddons (/Users/thomasknobloch/workspace/OXEWbm2/wbm/node_modules/angular-cli/lib/models/project.js:353:40)
  1. Mention any other details that might be useful.
    ng version works fine outside of my project (using the global installation of angular-cli).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenthelp wantedtype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions