0

I have below project structure as shown in the screenshot below. Both index.js and test.js are located at the same path i.e. ./assets/js/ but still the path is not recognized. The error says

Error: Cannot find module 'test.js' from 'C:\Users\meghshyam\desktop\browserifyproj\assets\js'

enter image description here enter image description here

0

1 Answer 1

1

Use var test = require('./test.js');

This way you are letting node know that its a file in the same folder

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.