Cannot find module './dist/cpexcel' - packaging bug
See original GitHub issueHey, I’m getting an error on this:
var XLSX = require('xlsx');
Here’s the stack trace:
Error: Cannot find module './dist/cpexcel'
at require (packages/modules-runtime.js:109:19)
at make_xlsx (packages/modules.js:422:47)
at meteorInstall.node_modules.xlsx.xlsx.js (packages/modules.js:12065:3)
at fileEvaluate (packages/modules-runtime.js:181:9)
at require (packages/modules-runtime.js:106:16)
at meteorInstall.server.platform.Methods.js (server/platform/Methods.js:35:12)
at fileEvaluate (packages/modules-runtime.js:181:9)
at require (packages/modules-runtime.js:106:16)
at /home/michael/scm/pid/Iron-Ruler-v2/app/.meteor/local/build/programs/server/app/app.js:3749:1
at /home/michael/scm/pid/Iron-Ruler-v2/app/.meteor/local/build/programs/server/boot.js:295:34
at Array.forEach (native)
at Function._.each._.forEach (/home/michael/.meteor/packages/meteor-tool/.1.4.2_3.m9wg9m++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at /home/michael/scm/pid/Iron-Ruler-v2/app/.meteor/local/build/programs/server/boot.js:128:5
at /home/michael/scm/pid/Iron-Ruler-v2/app/.meteor/local/build/programs/server/boot.js:344:5
at Function.run (/home/michael/scm/pid/Iron-Ruler-v2/app/.meteor/local/build/programs/server/profile.js:480:12)
at /home/michael/scm/pid/Iron-Ruler-v2/app/.meteor/local/build/programs/server/boot.js:343:11
Exited with code: 1
Here is a list of node_modules:
☀ ls node_modules Mod dev
adler-32 center-align exit-on-epipe locutus readable-stream util-deprecate
align-text cfb frac longest regenerator-runtime voc
amdefine cliui graceful-readlink meteor-node-stubs repeat-string webshot
async codepage handlebars minimist right-align window-size
autoprefixer colors highcharts moment source-map wordwrap
babel-runtime commander inherits nan ssf xlsx
babyparse concat-stream isarray node-hubspot string_decoder yaml-js
bcrypt core-js is-buffer optimist toastr yargs
bindings core-util-is jszip pako typedarray
bourbon crc-32 kind-of printj uglify-js
camelcase decamelize lazy-cache process-nextick-args uglify-to-browserify
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Error: Cannot find module in JavaScript [SOLVED]
Solution: Install missing module using Node Package Manager. The Node Package Manager, popularly known as npm is a command line tool that helps...
Read more >Xlsx-style-correct NPM
Check Xlsx-style-correct 1.0.0 package - Last release 1.0.0 with MIT ... node_modules/xlsx-style/dist/cpexcel.js Module not found: Error: Can't resolve '.
Read more >Cannot find module 'xlsx' - node.js - Stack Overflow
import xlsx from 'xlsx/xlsx';. This line works for me on node/typescript environment.
Read more >xlsx - npm Package Health Analysis - Snyk
Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice. Get ... Looks like xlsx is missing a...
Read more >sheetjs - webcomponents.org
The npm package also exposes the module with the module parameter, supported in ... import * as cptable from 'https://unpkg.com/xlsx/dist/cpexcel.full.mjs'; ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For the ones like me who just miss the --save in the install…
meteor npm install xlsx --save
@MichaelJCole I was able to reproduce your issue and I believe you need to add a line to the package.json.
Steps:
Not familiar with meteor so I am not sure if that is the correct approach.