-
-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
Type: BugThe issue has indentified a bugThe issue has indentified a bug
Description
Package version
v5.0.9
Node.js and npm version
- node: v14.15.1
- npm: v6.14.8
Issue
tslib has become an indirect dependency due to the ts compiler option "importHelpers": true used here: 5e73968#diff-b55cdbef4907b7045f32cc5360d48d262cca5f94062e353089f189f4460039e0R6
Importing the transpiled code requires for the "importer" to have installed tslib (dependency)
Example: node_modules/@adonisjs/redis/build/src/RedisConnection/index.js
"use strict";
/*
* @adonisjs/redis
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.RedisConnection = void 0;
const tslib_1 = require("tslib");Users now get the following exception when starting the production server:
Error: Cannot find module 'tslib'
Require stack:
- /app/node_modules/@adonisjs/redis/build/src/RedisConnection/index.js
- /app/node_modules/@adonisjs/redis/build/src/RedisManager/index.js
- /app/node_modules/@adonisjs/redis/build/providers/RedisProvider.js
- /app/node_modules/@poppinss/utils/build/src/esmRequire.js
- /app/node_modules/@poppinss/utils/build/index.js
- /app/node_modules/@adonisjs/fold/build/src/Ioc/index.js
- /app/node_modules/@adonisjs/fold/build/index.js
- /app/node_modules/@adonisjs/application/build/index.js
- /app/node_modules/@adonisjs/core/build/standalone.js
- /app/server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/app/node_modules/@adonisjs/redis/build/src/RedisConnection/index.js:12:17)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
Reproducing
Create a hello-world template project and add redis following the redis guide
Then:
npm run buildcp -r ./build ../../somewhere/soThatParentNodeModulesIsNotUsed- cd
npm ci --productionnode server.js
Sample Repository
Metadata
Metadata
Assignees
Labels
Type: BugThe issue has indentified a bugThe issue has indentified a bug