You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using vercel/ncc 0.36.0, I'm running into an odd issue that happens on Windows.
Running ncc build src/index.ts -o dist generates a dist/index.js file that starts with:
#!/usr/bin/env node
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 83633:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
...
rest of the file
If I try to npm i -g this module and then run it directly from console, it fails with some syntax errors.
Opening the generated scripts from the npm i -g command, shows that it contains the string /******/ (() => { // webpackBootstrap that shouldn't be there:
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node
/******/" ]; then
exec "$basedir/node
/******/" (() => { // webpackBootstrap "$basedir/node_modules/@my-lib/cli/dist/index.js" "$@"
else
exec node
/******/ (() => { // webpackBootstrap "$basedir/node_modules/@my-lib/cli/dist/index.js" "$@"
fi
If you notice, it is the same string as the 2nd line of dist/index.js.
Any guidance on how to solve this is appreciated.
Thanks!
The text was updated successfully, but these errors were encountered:
pmhpereira
changed the title
Can't npm install a module packed with ncc
Can't npm install a module packed with ncc on Windows
Jan 12, 2023
Hello all,
Using vercel/ncc 0.36.0, I'm running into an odd issue that happens on Windows.
Running
ncc build src/index.ts -o dist
generates adist/index.js
file that starts with:If I try to
npm i -g
this module and then run it directly from console, it fails with some syntax errors.Opening the generated scripts from the
npm i -g
command, shows that it contains the string/******/ (() => { // webpackBootstrap
that shouldn't be there:If you notice, it is the same string as the 2nd line of
dist/index.js
.Any guidance on how to solve this is appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: