Skip to content

Can't find '../package.json' on OS X #1647

@alsoicode

Description

@alsoicode
  • Node Version: 10.15.0
  • Platform: OS X
  • Compiler: Apple LLVM Version 10.0.0
  • Module:
Verbose output (from npm or node-gyp):

When building an Angular Universal project that uses node-sass, node-gyp fails on line 67 of node-gyp.js with:

Module not found: Error: Can't resolve '../package' in '/Users/btaylor/work/angular-apps/[project-name]/node_modules/node-gyp/lib

Paste your log here, between the backticks. It can be:
  - npm --verbose output,
  - or contents of npm-debug.log,
  - or output of node-gyp rebuild --verbose.

ERROR in ./node_modules/node-gyp/lib/node-gyp.js
Module not found: Error: Can't resolve '../../package' in '/Users/btaylor/work/angular-apps/lvs-ui/node_modules/node-gyp/lib'
 @ ./node_modules/node-gyp/lib/node-gyp.js 67:16-40
 @ ./node_modules/node-pre-gyp/lib/util/compile.js
 @ ./node_modules/node-pre-gyp/lib sync ^\.\/.*$
 @ ./node_modules/node-pre-gyp/lib/node-pre-gyp.js
 @ ./node_modules/fsevents/fsevents.js
 @ ./node_modules/chokidar/lib/fsevents-handler.js
 @ ./node_modules/chokidar/index.js
 @ ./node_modules/nunjucks/src/node-loaders.js
 @ ./node_modules/nunjucks/src/loaders.js
 @ ./node_modules/nunjucks/index.js
 @ ./server.ts

This only happens on OS X, currently at 10.14.2. I haven't experienced the same problem on Windows 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions