简体   繁体   中英

Error after installing and including npm module into Meteor project

I have a meteor project (latest version of Meteor).

meteor npm install --save name_of_package

This package is client side so I created a file inside my /client folder named mypackage.js ... inside I included the node package with:

import name_of_package from 'name_of_package';

Meteor will start but when I attempt to connect I am getting the following error:

graceful-fs.js:157 Uncaught TypeError: Cannot read property 'prototype' of undefined

Line 156-158 code-block of graceful-fs.js :

var fs$ReadStream = fs.ReadStream
ReadStream.prototype = Object.create(fs$ReadStream.prototype)
ReadStream.prototype.open = ReadStream$open

Any help would be greatly appreciated. Not sure what I am missing here.

Thanks!

May be a naming conflict. Did you perhaps install fs-extra ? Have a look at this: Uncaught TypeError: Cannot read property 'prototype' of undefined Meteor-File Package

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM