question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to import 'tape' v4 or v5 after lockdown

See original GitHub issue

This program:

// install-ses.js consists of:
//  import { lockdown } from 'ses';
//  lockdown();
import './install-ses.js';
import { test } from 'tape';

when run against SES-0.7.7, with a node_modules that has tape-4.11.0, fails like this:

$ node -r esm fail-import-tape.js
/home/warner/stuff/agoric/agoric-sdk/node_modules/string.prototype.trim/node_modules/es-abstract/helpers/callBind.js:1
TypeError: Cannot assign to read only property 'apply' of function 'function callBind() {
	return bind.apply($call, arguments);
}'
    at Object.<anonymous> (/home/warner/stuff/agoric/agoric-sdk/node_modules/string.prototype.trim/node_modules/es-abstract/helpers/callBind.js:15:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)

I tried disabling various taming options in lockdown() and it didn’t help.

I’m guessing that tape is using some module (es-abstract?) which thinks it can modify the primordials. We could find a way to accomodate that, or find a way to make it stop.

I’m able to import tape before lockdown, and tests seem to work normally, which is what I’ll do for now. That makes it a ‘vetted shim’, though, and it’s neither vetted nor a shim. Discuss.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
erightscommented, Feb 18, 2021

@warner @kriskowal I’m closing this as irrelevant, but reopen if I’m missing something or you disagree.

1reaction
kriskowalcommented, Sep 29, 2020

In summary, we discussed this at the Agoric SES meeting, and we do care about about tape versions running under SES.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to import 'tape' v4 or v5 after lockdown · Issue #293 · endojs ...
I'm guessing that tape is using some module ( es-abstract ?) which thinks it can modify the primordials. We could find a way...
Read more >
Unable to import Veritas NetBackup Tape Media
1. Mount the media and fulfill the original mount request. The original job will continue. 2. Deny the mount and reinitialize the job...
Read more >
Scalar i40 and Scalar i80 User's Guide - Quantum
4. Quantum Scalar i40 and Scalar i80 tape cartridges and empty slots to identify the types of tape cartridges that are installed in...
Read more >
nbu bpduplicate - Symantec Connect - NetBackup
command to duplicate from tape to disk? Tapes have been imported from site A to site B. On site B phase 2 import...
Read more >
Dell EMC DD OS Administration Guide
lets you create snapshots, import and export tapes to, or move tapes within a DD VTL. Getting Started. 42. Dell EMC DD OS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found