-1

I am currently going through a course on udemy with cloud 9 and so far things have been smooth. However gulp doesn't seem to work. Gulp watch doesn't work which I've been ignoring so far but now I'm at a point where I can't really continue without getting this to work and I can't really do anything because the gulp scripts command isn't working. This is the error I get:

ERROR in Entry module not found: Error: Can't resolve './wp-content/themes/fictional-university-theme/js/scripts.js' in '/home/ubuntu/workspace'

From webpack --display-error-details:

ERROR in Entry module not found: Error: Can't resolve './wp-content/themes/fictional-university-theme/js/scripts.js' in '/home/ubuntu/workspace' resolve './wp-content/themes/fictional-university-theme/js/scripts.js' in '/home/ubuntu/workspace' using description file: /home/ubuntu/workspace/package.json (relative path: .) Field 'browser' doesn't contain a valid alias configuration after using description file: /home/ubuntu/workspace/package.json (relative path: .) using description file: /home/ubuntu/workspace/package.json (relative path: ./wp-content/themes/fictional-university-theme/js/scripts.js) no extension Field 'browser' doesn't contain a valid alias configuration /home/ubuntu/workspace/wp-content/themes/fictional-university-theme/js/scripts.js doesn't exist .js Field 'browser' doesn't contain a valid alias configuration /home/ubuntu/workspace/wp-content/themes/fictional-university-theme/js/scripts.js.js doesn't exist .json Field 'browser' doesn't contain a valid alias configuration /home/ubuntu/workspace/wp-content/themes/fictional-university-theme/js/scripts.js.json doesn't exist as directory /home/ubuntu/workspace/wp-content/themes/fictional-university-theme/js/scripts.js doesn't exist

Unfortunately I don't know what any of this means so I can't fix it.

harishr
  • 17,807
  • 9
  • 78
  • 125
Dan
  • 37
  • 1
  • 4

1 Answers1

0

You need to open the folder where gulp is found and run these two lines

npm uninstall ws
npm install @ionic/app-scripts@latest

This will update it to the latest. I have done the same course and this solves the problem.

Also have a look in webpack.config.js

Change the line

App: settings.themeLocation + "js/scripts.js"

to

App: __dirname + '/'+settings.themeLocation + "js/scripts.js"
Thomas Williams
  • 1,528
  • 1
  • 18
  • 37
  • Thanks! I tried that and unfortunately it didn't work. If it helps when I run gulp scripts, it creates an empty folder in my themes folder named fictional-university. I tried changing my existing one to that (with the "-" instead of "_") but that resulted in nothing being displayed when I visit the site. – Dan Mar 17 '18 at 18:24
  • That sounds like you have the wrong path set up. It shouldn't actually create fictional-university but it should create scripts-bundled.js and style.css in the main folder. I think that you need to double check your path in the settings.js file – Thomas Williams Mar 18 '18 at 21:31