screeps-typescript-starter
screeps-typescript-starter copied to clipboard
(commonjs plugin) TypeError: parse is not a function
Steps to reproduce:
- Download the repository and unzip
- Navigate to directory and run
npm install
- 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
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
In package.json, change the version for the rollup-plugin-commonjs
to 8.1.4
, run npm install
and you should be golden.