screeps-typescript-starter icon indicating copy to clipboard operation
screeps-typescript-starter copied to clipboard

(commonjs plugin) TypeError: parse is not a function

Open bencbartlett opened this issue 6 years ago • 2 comments

Steps to reproduce:

  1. Download the repository and unzip
  2. Navigate to directory and run npm install
  3. Compile with rollup -c

Result:

src/main.ts → dist/main.js...
[!] (commonjs plugin) TypeError: parse is not a function in /Users/ben/Downloads/screeps-typescript-starter-master 2/node_modules/source-map/source-map.js
node_modules/source-map/source-map.js
TypeError: parse is not a function in /Users/ben/Downloads/screeps-typescript-starter-master 2/node_modules/source-map/source-map.js
    at error (/usr/local/lib/node_modules/rollup/dist/rollup.js:169:15)
    at /usr/local/lib/node_modules/rollup/dist/rollup.js:17413:17
    at <anonymous>

TypeScript version: 2.8.3 Node version: 8.10.0

bencbartlett avatar May 02 '18 00:05 bencbartlett

Facing the same issue

Thanks to the screeps slack & Gankdalf

Edit: This seems to have fixed it for me

To fix it temporarily, I added "rollup-plugin-commonjs": "8.3.0" in my devDependencies to override the new version.

(https://github.com/dherges/ng-packagr/issues/657)

Might help you as well @bencbartlett

m-rsmn avatar May 10 '18 13:05 m-rsmn

In package.json, change the version for the rollup-plugin-commonjs to 8.1.4, run npm install and you should be golden.

tcdejong avatar Nov 07 '18 09:11 tcdejong