When trying to update sentry I’m getting the following:
building assets for sentry v8.21.0.dev0 (build ceb8389c54d29f80b27703bb76c3880d923a3a5a)
module.js:529
throw err;
^
Error: Cannot find module 'camelcase'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/manu/src/github.com/provision/sentry/node_modules/yargs/lib/command.js:3:19)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
command failed [node_modules/.bin/webpack --bail] via [/home/manu/src/github.com/provision/sentry]
Traceback (most recent call last):
File "/home/manu/src/github.com/provision/sentry/src/sentry/utils/distutils/commands/build_assets.py", line 117, in _build
self._build_static()
File "/home/manu/src/github.com/provision/sentry/src/sentry/utils/distutils/commands/build_assets.py", line 139, in _build_static
self._run_command(['node_modules/.bin/webpack', '--bail'], env=env)
File "/home/manu/src/github.com/provision/sentry/src/sentry/utils/distutils/commands/base.py", line 150, in _run_command
return check_output(cmd, cwd=self.work_path, env=env)
File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['node_modules/.bin/webpack', '--bail']' returned non-zero exit status 1
unable to build Sentry's static assets!
Hint: You might be running an invalid version of NPM.
I’m using npm 5.3.0 and the current master (commit: ceb8389c54d29f80b27703bb76c3880d923a3a5a)
I realize that if I run yarn, the camelcase node_modules get installed, but it’s somehow removed when python setup.py develop runs.
So I modified the file ‘src/sentry/utils/distutils/commands/build_assets.py’ like this:
$ git diff
diff --git a/src/sentry/utils/distutils/commands/build_assets.py b/src/sentry/utils/distutils/commands/build_assets.py
index c631cc326..6abc66bb7 100644
--- a/src/sentry/utils/distutils/commands/build_assets.py
+++ b/src/sentry/utils/distutils/commands/build_assets.py
@@ -134,6 +134,8 @@ class BuildAssetsCommand(BaseBuildCommand):
# * React optimizes out certain code paths
# * Webpack will add version strings to built/referenced assets
env = dict(os.environ)
+ self._run_command(['yarn'], env=env)
+
env['SENTRY_STATIC_DIST_PATH'] = self.sentry_static_dist_path
env['NODE_ENV'] = 'production'
self._run_command(['node_modules/.bin/webpack', '--bail'], env=env)
Now I’m getting another unrelated error because I can’t sync the documentation:
at next (/srv/sentry8/src/sentry/node_modules/tapable/lib/Tapable.js:231:35)
resolve 'integration-docs-platforms' in '/srv/sentry8/src/sentry/src/sentry/static/sentry/app/views/onboarding'
Parsed request is a module
using description file: /srv/sentry8/src/sentry/package.json (relative path: ./src/sentry/static/sentry/app/views/onboarding)
aliased with mapping 'integration-docs-platforms': '/srv/sentry8/src/sentry/src/sentry/integration-docs/_platforms.json' to '/srv/sentry8/src/sentry/src/sentry/integration-docs/_platforms.json'