Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
npm install with local dependency returns TypeError when runnig

When I build my package with the default npm datetimepicker modules from the npm package repo everything works fine. But if I try to build with a local version, I ended with an error when I load the page saying that. I downloaded the local package from git hub.

Uncaught TypeError: eo.datetimepicker is not a function

Both my code and the datetimepicker have dependency on jquery (not sure if that's relevant).

The problem remains even if the datetimepicker package is identical to what npm gets from the repo ( I checkout the version that's in the npm repo)

For example, this works:

npm install 
npm run build

But this doesn't

npm install --save ../../datetimepicker
npm run build

I can see that in node_modules, a link is created for the jquery-datetimepicker module that points to the ../../datetimepicker folder where I cloned the repo.

In my code:

"use strict";

import 'bootstrap';
import 'bootstrap-toggle';
import '<package name>'

import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap-toggle/css/bootstrap-toggle.min.css'
import 'jquery-datetimepicker/jquery.datetimepicker.css'

My webpack config file:

module.exports = {
output: {
    path: path.resolve(__dirname, 'dist')
},
module: {
    rules: [
        {
            test: /\.css$/,
            use: [
                'style-loader',
                'css-loader'
            ]
        }
    ]
},
plugins: [
    new webpack.ProvidePlugin({
       $: "jquery",
       jQuery: "jquery"
   })
]

};

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!