Skip to content

I update to 0.5.4, error on MODULE_NOT_FOUND #81

@ncaq

Description

@ncaq

I update @sentry/electron 0.4.1 to 0.5.4.

And I rewrite function create to init.

My src/sentry.js.

import { init, captureMessage } from '@sentry/electron';

init({ dsn: 'foobar' });
captureMessage('Hello, world!');

So sentry is failed.
(My application name replaced to foo)

{ Error: Cannot find module "/home/ncaq/Desktop/foo/package.json".
    at webpackEmptyContext (/home/ncaq/Desktop/foo/app/webpack:/node_modules/@sentry/electron/dist/main sync:2:1)
    at getPackageJson (/home/ncaq/Desktop/foo/app/webpack:/node_modules/@sentry/electron/dist/main/context.js:80:1)
    at /home/ncaq/Desktop/foo/app/webpack:/node_modules/@sentry/electron/dist/main/context.js:240:25
    at Generator.next (<anonymous>)
    at fulfilled (/home/ncaq/Desktop/foo/app/webpack:/node_modules/@sentry/electron/dist/main/context.js:4:42)
    at <anonymous> code: 'MODULE_NOT_FOUND' }

However, /home/ncaq/Desktop/foo/package.json exist.
Since this is a full path, it is hard to think that searching for webpack or babel is the cause.

Is it bug?
Or my setting is invalid?


My env.

  • babel: 7.0.0-beta.46
  • @sentry/electron: 0.5.4
  • react: 16.2.0
  • webpack: 4.6.0
  • electron: 1.8.4
  • OS: Gentoo Linux
  • node: v9.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions