瀏覽代碼

Fix capnp workaround to work with newest Meteor and Node 12.x.

Thanks to kentonv !
Lauri Ojansivu 5 年之前
父節點
當前提交
b2d546579c
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      sandstorm.js

+ 1 - 3
sandstorm.js

@@ -22,9 +22,7 @@ const sandstormBoard = {
 
 if (isSandstorm && Meteor.isServer) {
   const fs = require('fs');
-  const pathParts = process.cwd().split('/');
-  const path = pathParts.join('/');
-  const Capnp = Npm.require(`${path}../../../node_modules/capnp.js`);
+  const Capnp = Npm.require(`capnp`);
   const Package = Capnp.importSystem('sandstorm/package.capnp');
   const Powerbox = Capnp.importSystem('sandstorm/powerbox.capnp');
   const Identity = Capnp.importSystem('sandstorm/identity.capnp');