Answer the question
In order to leave comments, you need to log in
How to connect packages from node_modules to Laravel?
I am using Laravel 8. NodeJS installed.
I want to install a CSGO demo parser on the site .
I put the package.
npm i demofile
In Laravel, in the app.js file which is in the resources, I put the line:
On the page in the github there is an example in which packages are imported at the beginning:
require('demofile');
import fs = require("fs");
import demofile = require("demofile");
Cannot use import statement outside a module
. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question