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

160
Views
can't load json-query package

In Windows cmd, I typed

npm install json-query

It seemed successfully by typing:

npm -v json-query

It said version of 8.5.5.

In my HTML, I did

<script src="https://requirejs.org/docs/release/2.3.5/minified/require.js"></script>
<script src="myscripts.js">  <!-- myscript.js is where I put my JavaScripts-->

In myscripts.js :

function someFunc(){
    var jsonQuery = require('json-query');
    var result = jsonQuery('traff_volume[gate=Ma Wan]', {
        data: obj
        });
    console.log(result);
}

The error message showed:

Uncaught Error: Module name "json-query" has not been loaded yet for context: _. Use require([])
http://requirejs.org/docs/errors.html#notloaded
    at makeError (require.js:5:1067)
    at Object.o [as require] (require.js:5:11053)
    at requirejs (require.js:5:14737)
    at creat_traffic_table (myscripts.js:175:19)
    at HTMLAnchorElement.el.onclick (myscripts.js:126:9)

Is there any other dependancy or setting I need to do?

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!